voyent
Messages posted by: Dumi  XML
Profile for Dumi -> Messages posted by Dumi [16] Go to Page: 1, 2 Next 
Author Message
Hi Judy,

Attached is a test project that shows the problem. I'm running Apache Tomcat 6.0.20 and I'm using JSF 2.0 Mojarra 2.0.3-FCS. The jars used are: commons-beanutils.jar, commons-collections.jar, commons-digester.jar, commons-logging.jar, icefaces-ace.jar, icefaces-compat.jar, icefaces.jar and icepush.jar, all taken from ICEfaces-2.0.0-bin.

I have only one page with an ice:outputConnectionStatus and one ice:commandLink. The session is set to expire after 1 minute. After 1 minute, if I click on the link I get the "User Expired Session" popup. But if I don't do anything the popup doesn't appear. I've did some debugging and the session destroyed event is triggered by the container and the SessionExpiredListener->sessionDestroyed method gets called:
Code:
    public void sessionDestroyed(HttpSessionEvent httpSessionEvent) {
 
         FacesContext fc = FacesContext.getCurrentInstance();
 
         //If there is no FacesContext, then the session likely timed out of it's own accord rather
         //then being invalidated programmatically as part of a JSF lifecycle.  In that case,
         //we can't put an exception into the queue.
         if (fc != null) {
             Application app = fc.getApplication();
             if (app == null) {
                 ApplicationFactory factory = (ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
                 app = factory.getApplication();
             }
 
             ExceptionQueuedEventContext ctxt =
                     new ExceptionQueuedEventContext(fc, new SessionExpiredException("Session has expired"));
             app.publishEvent(fc, ExceptionQueuedEvent.class, ctxt);
         }
 
         //If the session is destroyed and ICEpush is available, we can request a push request immediately
         //which should result in a SessionExpiredException being sent to the client.
         if (EnvUtils.isICEpushPresent()) {
             HttpSession session = httpSessionEvent.getSession();
             ServletContext servletContext = session.getServletContext();
             PushContext pushContext = PushContext.getInstance(servletContext);
             pushContext.push(session.getId());
         }
     }
 

The ICEpush is present so the session expired should be sent to the client, but nothing happens.

If you can point me to the right direction it would be great. Also, the next step would be to redirect the user when session expires, not to show the popup. And if possible without the compatibility mode...

Thanks & best regards,
Dumi.
Does anyone have an answer to this?

Also, is it possible to redirect when session expires instead of showing a popup without compatibility mode?

Thanks,
Dumi.
Hello again,

I've managed to find a workaround for the problem. I will write the details in case anyone will need them at some point.

As I wrote in the last reply the redirect works in an ICEfaces application without Spring. The long operations are performed in ICEfaces' listener and when they finish the redirect is triggered.

In my ICEfaces/Spring application I'm doing the long operations (some writing in the database) when the session is destroyed in a bean that subscribes to Spring's org.springframework.security.web.session.HttpSessionEventPublisher, not ICEfaces' com.icesoft.faces.util.event.servlet.ContextEventRepeater. But the session destroyed event comes first in ICEfaces listener and after that in Spring's. And no redirect is performed when Spring finishes...

The solution was to make the session destroyed event come first in Spring. Spring's listener is defined in web.xml:

Code:
	<listener>
 		<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
 	</listener>

while ICEfaces' is defined in its include.tld:

Code:
  <listener>
       <listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
   </listener>

And they are picked up in this order by the container. Which would be the good order unless we would not have this "FIXME" in org.apache.catalina.session.StandardSession:

Code:
    public void expire(boolean notify) {
 
         // Mark this session as "being expired" if needed
         if (expiring)
             return;
 
         synchronized (this) {
 
             if (manager == null)
                 return;
 
             expiring = true;
         
             // Notify interested application event listeners
             // FIXME - Assumes we call listeners in reverse order
             Context context = (Context) manager.getContainer();
             Object listeners[] = context.getApplicationLifecycleListeners();
             if (notify && (listeners != null)) {
                 ...

To reverse the order you need to have the following in web.xml:

Code:
	<listener>
 		<listener-class>com.icesoft.faces.util.event.servlet.ContextEventRepeater</listener-class>
 	</listener>
 	<listener>
 		<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
 	</listener>

You will get a duplicate warning message for the ContextEventRepeater, but the order will be changed. The container will pick up the one from web.xml and will give the warning for the one in include.tld.

That should be all ;)

Dumi.
Hi,

In the meantime I've switched from ICEfaces 1.8.2 to what's in the svn repository at the moment (1.8.3+). And the behavior has changed. There is no crash anymore. And the test application, the one without Spring, works just fine: no matter how long the tasks performed on session destroyed are, the redirecting takes place. But the original application, the one with Spring, still doesn't redirect with longer tasks.
Right now I'm looking into how the session destroyed event is sent from the container to the listeners...

Dumi.
Hello again!

I've continued digging for an answer, but didn't find one yet. What I did so far was to eliminate Spring from the equation and to be sure that it is an ICEfaces problem.
So, I've created a small dynamic web project using ICEfaces. I have only 2 pages - index.html and main.xhtml. The first one is a static page showing the text "home...". The second one is dynamic and I'm showing the creation time of the session.

This is the index.html page:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta name="description" content="test application">
 <link rel="stylesheet" type="text/css" title="Standard" href="/xmlhttp/css/rime/rime.css">
 <link rel="stylesheet" type="text/css" title="Standard" href="css/standard.css">
 <title>Test :: Homepage</title>
 </head>
 <body>
 Home...
 </body>
 </html>


And this is the main.xhtml page:
Code:
<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
 	xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
 	xmlns:ice="http://www.icesoft.com/icefaces/component">
 <head>
 <title>Test</title>
 <ice:outputStyle href="xmlhttp/css/rime/rime.css" />
 </head>
 <body>
 <ice:form partialSubmit="false" id="MainForm">
 	<ice:outputText value="#{bean.session}" />
 </ice:form>
 </body>
 </html>


What I'm trying to achieve is to redirect from the main.xhtml page to index.html page when the session expires. Unfortunately this only works if the listeners to the session destroyed event don't execute long operations.

In web.xml I have the following:
Code:
	<context-param>
 		<param-name>com.icesoft.faces.sessionExpiredRedirectURI</param-name>
 		<param-value>index.html</param-value>
 	</context-param>


In faces-config I have only one application bean defined:
Code:
	<managed-bean>
 		<description>Test bean.</description>
 		<managed-bean-name>bean</managed-bean-name>
 		<managed-bean-class>org.local.test.ApplicationListener</managed-bean-class>
 		<managed-bean-scope>application</managed-bean-scope>
 	</managed-bean>


This application bean subscribes to ContextEventRepeater to receive session destroyed events and it looks like this:
Code:
package org.local.test;
 
 import java.util.Date;
 
 import javax.annotation.PostConstruct;
 import javax.faces.context.FacesContext;
 import javax.servlet.http.HttpSession;
 
 import com.icesoft.faces.util.event.servlet.ContextDestroyedEvent;
 import com.icesoft.faces.util.event.servlet.ContextEventListener;
 import com.icesoft.faces.util.event.servlet.ContextEventRepeater;
 import com.icesoft.faces.util.event.servlet.ICEfacesIDDisposedEvent;
 import com.icesoft.faces.util.event.servlet.ICEfacesIDRetrievedEvent;
 import com.icesoft.faces.util.event.servlet.SessionDestroyedEvent;
 import com.icesoft.faces.util.event.servlet.ViewNumberDisposedEvent;
 import com.icesoft.faces.util.event.servlet.ViewNumberRetrievedEvent;
 
 public class ApplicationListener implements ContextEventListener {
 
 	@PostConstruct
 	public void init() {
 		ContextEventRepeater.addListener(this);
 	}
 
 	public String getSession() {
 		FacesContext context = FacesContext.getCurrentInstance();
 		if (context != null) {
 			HttpSession session = (HttpSession) context.getExternalContext().getSession(false);
 
 			return (new Date(session.getCreationTime())).toString();
 		}
 		return "no creation time";
 	}
 
 	@Override
 	public void contextDestroyed(ContextDestroyedEvent event) {
 	}
 
 	@Override
 	public void iceFacesIdDisposed(ICEfacesIDDisposedEvent event) {
 	}
 
 	@Override
 	public void iceFacesIdRetrieved(ICEfacesIDRetrievedEvent event) {
 	}
 
 	@Override
 	public boolean receiveBufferedEvents() {
 		return false;
 	}
 
 	@Override
 	public void sessionDestroyed(SessionDestroyedEvent event) {
 		try {
 			Thread.sleep(2000);
 		} catch (InterruptedException e) {
 			e.printStackTrace();
 		}
 	}
 
 	@Override
 	public void viewNumberDisposed(ViewNumberDisposedEvent event) {
 	}
 
 	@Override
 	public void viewNumberRetrieved(ViewNumberRetrievedEvent event) {
 	}
 
 }
 


I simulate long operations using a Thread.sleep in the sessionDestroyed method. And in this case the redirect is not performed. The page is refreshed and you can see this by looking at the session creation time. And in the log file I get:
Code:
Nov 30, 2010 5:31:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher notifySessionShutdown
 SEVERE: java.lang.IllegalStateException: getAttributeNames: Session already invalidated
 Nov 30, 2010 5:31:47 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor shutdown
 INFO: Session already invalidated.


If I remove the sleep from the sessionDestroyed method the redirect works just fine.

Any feedback would be really appreciated.

Thanks & best regards,
Dumi.
Hi,

I have an ICEfaces 1.8.2 application and I'm using Spring Security 3.0.2 for user authentication. When the session expires for logged in users I'm redirecting them to a index.html page. The problem is that really often I get the HTTP 500 error with the following stack trace:

Code:
 IllegalStateException
 getAttribute: Session already invalidated
 
 17:46:05,187 ERROR D2DFaceletViewHandler:294 - Problem in renderResponse: User session has expired or it was invalidated.
 com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:77)
 	at com.icesoft.faces.webapp.http.servlet.ServletSessionAttributeMap.getAttribute(ServletSessionAttributeMap.java:16)
 	at com.icesoft.faces.context.AbstractAttributeMap.get(AbstractAttributeMap.java:140)
 	at com.icesoft.faces.context.effects.JavascriptContext.getIncludedLibs(JavascriptContext.java:130)
 	at com.icesoft.faces.context.DOMResponseWriter.appendContentReferences(DOMResponseWriter.java:505)
 	at com.icesoft.faces.context.DOMResponseWriter.enhanceHead(DOMResponseWriter.java:491)
 	at com.icesoft.faces.context.DOMResponseWriter.enhanceAndFixDocument(DOMResponseWriter.java:322)
 	at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:190)
 	at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:285)
 	at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
 	at org.local.quizz.errors.ExceptionsViewHandler.renderView(ExceptionsViewHandler.java:54)
 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 	at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
 	at com.icesoft.faces.context.View$2$1.respond(View.java:48)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
 	at com.icesoft.faces.context.View$2.serve(View.java:77)
 	at com.icesoft.faces.context.View.servePage(View.java:149)
 	at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
 	at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
 	at org.local.quizz.security.CustomExceptionTranslationFilter.doFilter(CustomExceptionTranslationFilter.java:24)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
 	at java.lang.Thread.run(Thread.java:680)
 Caused by: java.lang.IllegalStateException: getAttribute: Session already invalidated
 	at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1032)
 	at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:75)
 	... 70 more
 Nov 28, 2010 5:46:05 PM com.sun.faces.lifecycle.Phase doPhase
 SEVERE: JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /quiz.xhtml) 
 Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@4276da32]
 17:46:05,190 ERROR View:83 - Exception occured during rendering on http://localhost:8080/quizz/quiz.xhtml [/quiz.xhtml]
 javax.faces.FacesException: com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 	at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
 	at com.icesoft.faces.context.View$2$1.respond(View.java:48)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
 	at com.icesoft.faces.context.View$2.serve(View.java:77)
 	at com.icesoft.faces.context.View.servePage(View.java:149)
 	at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
 	at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
 	at org.local.quizz.security.CustomExceptionTranslationFilter.doFilter(CustomExceptionTranslationFilter.java:24)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
 	at java.lang.Thread.run(Thread.java:680)
 Caused by: com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:77)
 	at com.icesoft.faces.webapp.http.servlet.ServletSessionAttributeMap.getAttribute(ServletSessionAttributeMap.java:16)
 	at com.icesoft.faces.context.AbstractAttributeMap.put(AbstractAttributeMap.java:156)
 	at org.local.quizz.errors.ExceptionsViewHandler.handleRenderException(ExceptionsViewHandler.java:70)
 	at org.local.quizz.errors.ExceptionsViewHandler.renderView(ExceptionsViewHandler.java:56)
 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	... 58 more
 Caused by: java.lang.IllegalStateException: getAttribute: Session already invalidated
 	at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1032)
 	at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:75)
 	... 64 more
 17:46:05,191 ERROR View:151 - Problem encountered during View.servePage 
 javax.faces.FacesException: com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:128)
 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 	at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
 	at com.icesoft.faces.context.View$2$1.respond(View.java:48)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
 	at com.icesoft.faces.context.View$2.serve(View.java:77)
 	at com.icesoft.faces.context.View.servePage(View.java:149)
 	at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
 	at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
 	at org.local.quizz.security.CustomExceptionTranslationFilter.doFilter(CustomExceptionTranslationFilter.java:24)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
 	at java.lang.Thread.run(Thread.java:680)
 Caused by: com.icesoft.faces.webapp.http.core.SessionExpiredException: User session has expired or it was invalidated.
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:77)
 	at com.icesoft.faces.webapp.http.servlet.ServletSessionAttributeMap.getAttribute(ServletSessionAttributeMap.java:16)
 	at com.icesoft.faces.context.AbstractAttributeMap.put(AbstractAttributeMap.java:156)
 	at org.local.quizz.errors.ExceptionsViewHandler.handleRenderException(ExceptionsViewHandler.java:70)
 	at org.local.quizz.errors.ExceptionsViewHandler.renderView(ExceptionsViewHandler.java:56)
 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	... 58 more
 Caused by: java.lang.IllegalStateException: getAttribute: Session already invalidated
 	at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1032)
 	at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:75)
 	... 64 more
 Nov 28, 2010 5:46:05 PM org.apache.catalina.core.StandardWrapperValve invoke
 SEVERE: Servlet.service() for servlet Persistent Faces Servlet threw exception
 java.lang.IllegalStateException: getAttribute: Session already invalidated
 	at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1032)
 	at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:110)
 	at com.icesoft.faces.webapp.http.servlet.ProxyHttpSession.getAttribute(ProxyHttpSession.java:75)
 	at com.icesoft.faces.webapp.http.servlet.ServletSessionAttributeMap.getAttribute(ServletSessionAttributeMap.java:16)
 	at com.icesoft.faces.context.AbstractAttributeMap.put(AbstractAttributeMap.java:156)
 	at org.local.quizz.errors.ExceptionsViewHandler.handleRenderException(ExceptionsViewHandler.java:70)
 	at org.local.quizz.errors.ExceptionsViewHandler.renderView(ExceptionsViewHandler.java:56)
 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
 	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 	at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)
 	at com.icesoft.faces.context.View$2$1.respond(View.java:48)
 	at com.icesoft.faces.webapp.http.servlet.ServletRequestResponse.respondWith(ServletRequestResponse.java:201)
 	at com.icesoft.faces.context.View$2.serve(View.java:77)
 	at com.icesoft.faces.context.View.servePage(View.java:149)
 	at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:52)
 	at com.icesoft.faces.webapp.http.common.ServerProxy.service(ServerProxy.java:11)
 	at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet$4.service(MainSessionBoundServlet.java:149)
 	at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
 	at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:53)
 	at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
 	at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:131)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
 	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
 	at org.local.quizz.security.CustomExceptionTranslationFilter.doFilter(CustomExceptionTranslationFilter.java:24)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:109)
 	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
 	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
 	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
 	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
 	at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
 	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:574)
 	at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1527)
 	at java.lang.Thread.run(Thread.java:680)
 


Both Spring and ICEfaces are told to redirect to the page. For ICEfaces I have the following in web.xml:
Code:
 	<context-param>
 		<param-name>com.icesoft.faces.sessionExpiredRedirectURI</param-name>
 		<param-value>index.html</param-value>
 	</context-param>
 


And in applicationContext-security.xml I have the necessary settings for Spring.

But, as you can see in the stack trace, instead of redirecting, it tries to re-render the page where the user was when the session expired.

I also have an ApplicationListener where, when receiving SessionDestroyedEvent, I'm doing some operations. And I observed that if these operations take longer, the application doesn't throw the exception anymore, but the redirect is still not performed. The current page stays and when the user clicks on anything it gets redirected to the index.html page.

Any help would be appreciated.

Thanks & best regards,
Dumi.
Hi,

I've tried defining the beans in the faces-config.xml and the result is the same (the stack is also the same).

Code:
 <managed-bean>
 	<description>
 		Used to initiate server side renders
 	</description>
 	<managed-bean-name>rM</managed-bean-name>
 	<managed-bean-class>com.icesoft.faces.async.render.RenderManager</managed-bean-class>
 	<managed-bean-scope>application</managed-bean-scope>
 </managed-bean>
 
 <managed-bean>
 	<managed-bean-name>tabSessionBean</managed-bean-name>
 	<managed-bean-class>com.closingfocus.spm.gui.TabSessionBean</managed-bean-class>
 	<managed-bean-scope>session</managed-bean-scope>
 	<managed-property>
 		<property-name>renderManager</property-name>
 		<value>#{rM}</value>
 	</managed-property>
 	<managed-property>
 		<property-name>sessionFactory</property-name>
 		<value>#{sessionFactory}</value>
 	</managed-property>
 </managed-bean>
 


About the other solution, I'm already using a resolver, the org.springframework.web.jsf.el.SpringBeanFacesELResolver one. The org.springframework.web.jsf.DelegatingVariableResolver is the older one and is deprecated (API variable-resolver is deprecated after JSF 1.1. Use el-resolver instead.). But I also tried it and the issue is still there.

Thanks,
Dumi.
Hi,

Here is also my applicationContext.xml:

Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <beans xmlns="http://www.springframework.org/schema/beans" xmlns:jee="http://www.springframework.org/schema/jee"
 	xmlns:context="http://www.springframework.org/schema/context" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
 
 	<!-- Database Resources and Transaction Management -->
 	<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
 		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
 		<property name="url" value="jdbc:mysql://localhost:3306/sample_cfdb" />
 		<property name="username" value="sample_admin" />
 		<property name="password" value="admin" />
 	</bean>
 	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
 		<property name="dataSource" ref="dataSource" />
 		<property name="useTransactionAwareDataSource" value="false" />
 		<property name="exposeTransactionAwareSessionFactory" value="false" />
 		<property name="mappingResources">
 			<list>
 				<value>com/sampleapp/spm/model/mapping/Customers.hbm.xml</value>
 				<value>com/sampleapp/spm/model/mapping/Users.hbm.xml</value>
 				<value>com/sampleapp/spm/model/mapping/UsersAuthorities.hbm.xml</value>
 			</list>
 		</property>
 		<property name="hibernateProperties">
 			<props>
 				<prop key="connection.pool_size">1</prop>
 				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
 				<prop key="hibernate.current_session_context_class">org.hibernate.context.ThreadLocalSessionContext</prop>
 				<prop key="show_sql">true</prop>
 				<prop key="hibernate.generate_statistics">true</prop>
 				<prop key="hibernate.bytecode.use_reflection_optimizer">false</prop>
 			</props>
 		</property>
 	</bean>
 
 	<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
 		<property name="sessionFactory" ref="sessionFactory" />
 	</bean>
 
 	<!-- Managers -->
 	<bean id="customerManager" class="com.sampleapp.spm.model.managers.CustomerManager">
 		<constructor-arg ref="sessionFactory" />
 	</bean>
 
 	<!-- GUI beans-->
 	<bean id="renderManager" class="com.icesoft.faces.async.render.RenderManager" />
 
 	<!-- Session beans -->
 	<bean id="customerSessionBean" class="com.sampleapp.spm.gui.CustomerSessionBean" scope="session">
 		<constructor-arg ref="sessionFactory" />
 		<property name="renderManager" ref="renderManager" />
 	</bean>
 
 	<bean id="userSessionBean" class="com.sampleapp.spm.gui.UserSessionBean" scope="session">
 		<constructor-arg ref="sessionFactory" />
 		<property name="renderManager" ref="renderManager" />
 	</bean>
 
 	<!-- Other beans -->
 	<bean id="loggerListener" class="org.springframework.security.event.authentication.LoggerListener" />
 
   <bean id="sessionListener" class="com.sampleapp.spm.gui.common.SessionListener" scope="session" />
 </beans>
 


As you can see I have the renderManager defined here and it is referenced by my backing beans.

Thanks,
Dumi.
Yes, sure, here they are:

web.xml
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="sampleapp" version="2.5">
   <display-name>sampleapp</display-name>
   <session-config>
     <session-timeout>100</session-timeout>
   </session-config>
   <welcome-file-list>
     <welcome-file>index.html</welcome-file>
     <welcome-file>index.htm</welcome-file>
     <welcome-file>index.jsp</welcome-file>
     <welcome-file>default.html</welcome-file>
     <welcome-file>default.htm</welcome-file>
     <welcome-file>default.jsp</welcome-file>
   </welcome-file-list>
   <servlet>
     <servlet-name>Faces Servlet</servlet-name>
     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet>
     <servlet-name>Resource Servlet</servlet-name>
     <servlet-class>org.primefaces.ui.resource.ResourceServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>Resource Servlet</servlet-name>
     <url-pattern>/primefaces_resources/*</url-pattern>
   </servlet-mapping>
   <context-param>
     <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
     <param-value>server</param-value>
   </context-param>
   <context-param>
     <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
     <param-value>.jspx</param-value>
   </context-param>
   <context-param>
     <description>To allow multiple windows for a single application.</description>
     <param-name>com.icesoft.faces.concurrentDOMViews</param-name>
     <param-value>false</param-value>
   </context-param>
   <context-param>
     <description>Turn on/off application-wide synchronous or asynchronous updates.</description>
     <param-name>com.icesoft.faces.synchronousUpdate</param-name>
     <param-value>false</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.connectionTimeout</param-name>
     <param-value>3600000</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.connectionLostRedirectURI</param-name>
     <param-value>main.jspx</param-value>
   </context-param>
   <context-param>
     <param-name>com.icesoft.faces.sessionExpiredRedirectURI</param-name>
     <param-value>main.jspx</param-value>
   </context-param>
   <servlet>
     <servlet-name>Persistent Faces Servlet</servlet-name>
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>Persistent Faces Servlet</servlet-name>
     <url-pattern>*.iface</url-pattern>
     <url-pattern>*.jspx</url-pattern>
     <url-pattern>/xmlhttp/* </url-pattern>
     <url-pattern>/faces/*</url-pattern>
   </servlet-mapping>
   <servlet>
     <servlet-name>Blocking Servlet</servlet-name>
     <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>Blocking Servlet</servlet-name>
     <url-pattern>/block/*</url-pattern>
   </servlet-mapping>
   <servlet>
     <servlet-name>uploadServlet</servlet-name>
     <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
   </servlet>
   <servlet-mapping>
     <servlet-name>uploadServlet</servlet-name>
     <url-pattern>/uploadHtml</url-pattern>
   </servlet-mapping>
   <listener>
     <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
   </listener>
   <listener>
     <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
   </listener>
   <listener>
     <listener-class>org.springframework.security.ui.session.HttpSessionEventPublisher</listener-class>
   </listener>
   <filter>
     <filter-name>filterChainProxy</filter-name>
     <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
   </filter>
   <filter-mapping>
     <filter-name>filterChainProxy</filter-name>
     <url-pattern>/*</url-pattern>
     <dispatcher>REQUEST</dispatcher>
     <dispatcher>FORWARD</dispatcher>
     <dispatcher>INCLUDE</dispatcher>
     <dispatcher>ERROR</dispatcher>
   </filter-mapping>
   <context-param>
     <param-name>contextConfigLocation</param-name>
     <param-value>
 			/WEB-INF/applicationContext.xml
 			/WEB-INF/applicationContext-security.xml
 		</param-value>
   </context-param>
 </web-app>
 


faces-config.xml
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 
 <faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
   version="1.2">
 
   <component>
     <component-type>com.sampleapp.comps.customBorder</component-type>
     <component-class>com.sampleapp.tags.comps.CustomBorder</component-class>
   </component>
   <component>
     <component-type>com.sampleapp.comps.defaultAction</component-type>
     <component-class>com.sampleapp.tags.comps.DefaultAction</component-class>
   </component>
   <component>
     <component-type>com.sampleapp.comps.setFocus</component-type>
     <component-class>com.sampleapp.tags.comps.SetFocus</component-class>
   </component>
   <component>
     <component-type>com.sampleapp.comps.extendedDataPaginator</component-type>
     <component-class>com.sampleapp.tags.comps.ExtendedDataPaginator</component-class>
   </component>
 
   <render-kit>
     <renderer>
       <component-family>com.sampleapp.comps</component-family>
       <renderer-type>com.sampleapp.renderers.CustomBorderRenderer</renderer-type>
       <renderer-class>com.sampleapp.tags.renderers.CustomBorderRenderer</renderer-class>
     </renderer>
     <renderer>
       <component-family>javax.faces.Panel</component-family>
       <renderer-type>com.sampleapp.renderers.ExtendedDataPaginatorRenderer</renderer-type>
       <renderer-class>com.sampleapp.tags.renderers.ExtendedDataPaginatorRenderer</renderer-class>
     </renderer>
   </render-kit>
 
   <application>
     <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
     <locale-config>
       <default-locale>en</default-locale>
       <supported-locale>en</supported-locale>
     </locale-config>
     <message-bundle>com.sampleapp.resources.msg</message-bundle>
   </application>
 
   <converter>
     <converter-for-class>java.util.Date</converter-for-class>
     <converter-class>com.sampleapp.spm.util.LocalDateConverter</converter-class>
   </converter>
 </faces-config>
 


applicationContext-security.xml
Code:
 <?xml version="1.0" encoding="UTF-8"?>
 <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans"
 	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
 		http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
 		http://www.springframework.org/schema/security
 		http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
 
 	<beans:bean id="authenticationManager" class="org.springframework.security.providers.ProviderManager">
 		<beans:property name="providers">
 			<beans:list>
 				<beans:ref local="daoAuthenticationProvider" />
 				<beans:ref local="anonymousAuthenticationProvider" />
 				<beans:ref local="rememberMeAuthenticationProvider" />
 			</beans:list>
 		</beans:property>
 		<beans:property name="sessionController" ref="concurrentSessionController" />
 	</beans:bean>
 
 	<beans:bean id="filterChainProxy" class="org.springframework.security.util.FilterChainProxy">
 		<filter-chain-map path-type="ant">
 			<filter-chain pattern="/**"
 				filters="concurrentSessionFilter,httpSessionContextIntegrationFilter,logoutFilter,authenticationProcessingFilter,securityContextHolderAwareRequestFilter,rememberMeProcessingFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterSecurityInterceptor" />
 
 		</filter-chain-map>
 	</beans:bean>
 
 	<beans:bean id="concurrentSessionFilter" class="org.springframework.security.concurrent.ConcurrentSessionFilter">
 		<beans:property name="expiredUrl" value="/main.jspx" />
 		<beans:property name="sessionRegistry" ref="sessionRegistry" />
 	</beans:bean>
 	<beans:bean id="concurrentSessionController" class="org.springframework.security.concurrent.ConcurrentSessionControllerImpl">
 		<beans:property name="maximumSessions" value="1" />
 		<beans:property name="exceptionIfMaximumExceeded" value="false" />
 		<beans:property name="sessionRegistry" ref="sessionRegistry" />
 	</beans:bean>
 	<beans:bean id="sessionRegistry" class="org.springframework.security.concurrent.SessionRegistryImpl" />
 
 	<beans:bean id="httpSessionContextIntegrationFilter" class="org.springframework.security.context.HttpSessionContextIntegrationFilter">
 		<beans:property name="forceEagerSessionCreation" value="true" />
 	</beans:bean>
 
 	<beans:bean id="logoutFilter" class="org.springframework.security.ui.logout.LogoutFilter">
 		<beans:property name="filterProcessesUrl" value="/j_spring_security_logout" />
 		<beans:constructor-arg value="/main.jspx" />
 		<beans:constructor-arg>
 			<beans:list>
 				<beans:ref bean="applicationListener" />
 				<beans:ref bean="rememberMeServices" />
 				<beans:bean class="org.springframework.security.ui.logout.SecurityContextLogoutHandler">
 					<beans:property name="invalidateHttpSession" value="true" />
 				</beans:bean>
 			</beans:list>
 		</beans:constructor-arg>
 	</beans:bean>
 
 	<beans:bean id="authenticationProcessingFilter" class="com.sampleapp.spm.security.MyAuthenticationProcessingFilter">
 		<beans:property name="authenticationFailureUrl" value="/main.jspx?login_error=1" />
 		<beans:property name="authenticationManager" ref="authenticationManager" />
 		<beans:property name="defaultTargetUrl" value="/main.jspx" />
 		<beans:property name="filterProcessesUrl" value="/j_spring_security_check" />
 		<beans:property name="rememberMeServices" ref="rememberMeServices" />
 		<beans:property name="alwaysUseDefaultTargetUrl" value="true" />
 		<beans:property name="sessionRegistry" ref="sessionRegistry" />
 		<beans:property name="usernameParameter" value="j_username" />
 		<beans:property name="passwordParameter" value="j_password" />
 	</beans:bean>
 
 	<!--
 		<beans:bean id="basicProcessingFilter" class="org.springframework.security.ui.basicauth.BasicProcessingFilter">
 		<beans:property name="authenticationManager" ref="authenticationManager" /> <beans:property
 		name="authenticationEntryPoint" ref="basicAuthenticationEntryPoint" /> </beans:bean> <beans:bean
 		id="basicAuthenticationEntryPoint" class="org.springframework.security.ui.basicauth.BasicProcessingFilterEntryPoint">
 		<beans:property name="realmName"> <beans:value>TODO</beans:value> </beans:property> </beans:bean>
 	-->
 
 	<beans:bean id="securityContextHolderAwareRequestFilter" class="org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter" />
 
 	<beans:bean id="rememberMeProcessingFilter" class="org.springframework.security.ui.rememberme.RememberMeProcessingFilter">
 		<beans:property name="authenticationManager" ref="authenticationManager" />
 		<beans:property name="rememberMeServices" ref="rememberMeServices" />
 	</beans:bean>
 	<beans:bean id="rememberMeServices" class="org.springframework.security.ui.rememberme.TokenBasedRememberMeServices">
 		<beans:property name="userDetailsService" ref="myUserDetailsService" />
 		<beans:property name="parameter" value="_spring_security_remember_me" />
 		<beans:property name="key" value="springRocks" />
 		<beans:property name="tokenValiditySeconds" value="1209600" />
 	</beans:bean>
 	<beans:bean id="rememberMeAuthenticationProvider" class="org.springframework.security.providers.rememberme.RememberMeAuthenticationProvider">
 		<beans:property name="key" value="springRocks" />
 	</beans:bean>
 
 	<beans:bean id="anonymousProcessingFilter" class="org.springframework.security.providers.anonymous.AnonymousProcessingFilter">
 		<beans:property name="key" value="springRocks" />
 		<beans:property name="userAttribute" value="anonymous,ROLE_ANONYMOUS" />
 	</beans:bean>
 	<beans:bean id="anonymousAuthenticationProvider" class="org.springframework.security.providers.anonymous.AnonymousAuthenticationProvider">
 		<beans:property name="key">
 			<beans:value>anonymous</beans:value>
 		</beans:property>
 	</beans:bean>
 
 	<beans:bean id="exceptionTranslationFilter" class="org.springframework.security.ui.ExceptionTranslationFilter">
 		<beans:property name="authenticationEntryPoint" ref="authenticationProcessingFilterEntryPoint" />
 		<beans:property name="accessDeniedHandler" ref="accessDeniedHandler" />
 	</beans:bean>
 	<beans:bean id="authenticationProcessingFilterEntryPoint" class="org.springframework.security.ui.webapp.AuthenticationProcessingFilterEntryPoint">
 		<beans:property name="loginFormUrl" value="/main.jspx" />
 		<beans:property name="forceHttps" value="false" />
 	</beans:bean>
 	<beans:bean id="accessDeniedHandler" class="org.springframework.security.ui.AccessDeniedHandlerImpl">
 	</beans:bean>
 
 	<beans:bean id="sessionFixationProtectionFilter" class="org.springframework.security.ui.SessionFixationProtectionFilter">
 		<beans:property name="sessionRegistry" ref="sessionRegistry" />
 		<!--<beans:property name="migrateSessionAttributes" value="true" />-->
 	</beans:bean>
 
 	<beans:bean id="filterSecurityInterceptor" class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
 		<beans:property name="authenticationManager" ref="authenticationManager" />
 		<beans:property name="accessDecisionManager" ref="accessDecisionManager" />
 		<beans:property name="objectDefinitionSource" ref="secureResourceFilter" />
 		<beans:property name="observeOncePerRequest" value="true" />
 	</beans:bean>
 
 	<beans:bean id="accessDecisionManager" class="org.springframework.security.vote.AffirmativeBased">
 		<beans:property name="allowIfAllAbstainDecisions" value="false" />
 		<beans:property name="decisionVoters">
 			<beans:list>
 				<beans:bean class="org.springframework.security.vote.RoleVoter" />
 				<beans:bean class="org.springframework.security.vote.AuthenticatedVoter" />
 			</beans:list>
 		</beans:property>
 	</beans:bean>
 
 	<beans:bean id="secureResourceFilter" class="org.springframework.security.intercept.web.DefaultFilterInvocationDefinitionSource">
 		<beans:constructor-arg ref="antUrlPathMatcher" />
 		<beans:constructor-arg ref="requestMap" />
 	</beans:bean>
 
 	<beans:bean id="antUrlPathMatcher" class="org.springframework.security.util.AntUrlPathMatcher" />
 
 	<beans:bean id="requestMap" class="com.sampleapp.spm.security.RequestMapFactoryBean" init-method="init">
 		<beans:constructor-arg ref="sessionFactory" />
 	</beans:bean>
 
 	<beans:bean id="passwordEncoder" class="org.springframework.security.providers.encoding.ShaPasswordEncoder">
 		<beans:constructor-arg value="512" />
 	</beans:bean>
 	
 	<beans:bean id="daoAuthenticationProvider" class="org.springframework.security.providers.dao.DaoAuthenticationProvider">
 		<beans:property name="userDetailsService" ref="myUserDetailsService" />
 		<beans:property name="hideUserNotFoundExceptions" value="false" />
 		<beans:property name="passwordEncoder" ref="passwordEncoder" />
 	</beans:bean>
 
 	<beans:bean id="myUserDetailsService" class="com.sampleapp.spm.model.managers.UserManager">
 		<beans:constructor-arg ref="sessionFactory" />
 	</beans:bean>
 
 	<beans:bean id="loginBean" class="com.sampleapp.spm.security.LoginBean" scope="request" />
 
 	<beans:bean id="helperBean" class="com.sampleapp.spm.security.HelperBean" scope="session">
 		<beans:constructor-arg ref="sessionFactory" />
 	</beans:bean>
 
 	<beans:bean id="applicationListener" class="com.sampleapp.spm.gui.common.ApplicationListener" scope="singleton">
 		<beans:property name="userDetailsService" ref="myUserDetailsService" />
 		<beans:property name="maxAttempts" value="3" />
 		<beans:property name="lockTime" value="60" />
 	</beans:bean>
 
 	<beans:bean id="strategySetterBean" class="com.sampleapp.spm.util.StrategySetter" scope="singleton" />
 
 	<beans:bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
 		<beans:property name="basenames">
 			<beans:list>
 				<beans:value>com/sampleapp/resources/msg</beans:value>
 			</beans:list>
 		</beans:property>
 	</beans:bean>
 
 </beans:beans>
 


Thanks,
Dumi.
Hi,

I've been using ICEfaces 1.8.1 and I thought the fix for this issue http://jira.icefaces.org/browse/ICE-2816 also coveres a problem I'm facing. Unfortunatelly it doesn't so I've upgraded to ICEfaces 1.8.2 hoping the problem is fixed here. But is not ;(

The problem is that SecurityContextHolder.getContext().getAuthentication() returns null after calling Code:
renderManager.getOnDemandRenderer(entity.getId().toString()).requestRender();


Here is the stack trace:
Code:
 Daemon Thread [Render Thread - 0] (Suspended (breakpoint at line 81 in HelperBean))	
 	HelperBean.getSelectedPanelName() line: 81	
 	GeneratedMethodAccessor224.invoke(Object, Object[]) line: not available	
 	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
 	Method.invoke(Object, Object...) line: not available	
 	BeanELResolver.getValue(ELContext, Object, Object) line: 62	
 	FacesCompositeELResolver(CompositeELResolver).getValue(ELContext, Object, Object) line: 54	
 	FacesCompositeELResolver.getValue(ELContext, Object, Object) line: 72	
 	AstValue.getValue(EvaluationContext) line: 118	
 	ValueExpressionImpl.getValue(ELContext) line: 186	
 	ValueBindingValueExpressionAdapter.getValue(FacesContext) line: 113	
 	PanelStack.getSelectedPanel() line: 112	
 	PanelStackRenderer.encodeChildren(FacesContext, UIComponent) line: 94	
 	PanelStack(UIComponentBase).encodeChildren(FacesContext) line: 837	
 	DomBasicRenderer.encodeParentAndChildren(FacesContext, UIComponent) line: 358	
 	GroupRenderer(GroupRenderer).encodeChildren(FacesContext, UIComponent) line: 96	
 	HtmlPanelGroup(UIComponentBase).encodeChildren(FacesContext) line: 837	
 	D2DViewHandler.renderResponse(FacesContext, UIComponent) line: 492	
 	D2DViewHandler.renderResponse(FacesContext, UIComponent) line: 497	
 	D2DViewHandler.renderResponse(FacesContext, UIComponent) line: 497	
 	D2DViewHandler.renderResponse(FacesContext, UIComponent) line: 497	
 	D2DViewHandler.renderResponse(FacesContext, UIComponent) line: 497	
 	D2DViewHandler.renderResponse(FacesContext) line: 467	
 	D2DViewHandler.renderView(FacesContext, UIViewRoot) line: 159	
 	RenderResponsePhase.execute(FacesContext) line: 110	
 	RenderResponsePhase(Phase).doPhase(FacesContext, Lifecycle, ListIterator<PhaseListener>) line: 100	
 	LifecycleImpl.render(FacesContext) line: 139	
 	PersistentFacesState.render() line: 176	
 	PersistentFacesState.executeAndRender() line: 312	
 	RunnableRender.run() line: 143	
 	ThreadPoolExecutor$Worker.runTask(Runnable) line: 665	
 	ThreadPoolExecutor$Worker.run() line: 690	
 	Thread.run() line: not available	
 


As an workaround I'm taking the Authentication object from the context obtained like this:
Code:
 SecurityContext sc = (SecurityContext) FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get(
 		        HttpSessionContextIntegrationFilter.SPRING_SECURITY_CONTEXT_KEY);


Am I doing something wrong or is this indeed a problem?

Thanks & best regards,
Dumi.
Hi,

I also have some problems with nested UISeries. In my case I have PanelTabSet->DataTable->DataTable. While looking for an answer I've come across your problem and I've tried a well known workaround found in the forums.

Just bind your middle PanelSeries like this:

Code:
 					<ice:panelSeries id="panelSeriesweekdays"
 						binding="#{bean11429.panelSeries}" value="#{user.weekdays}"
 						var="workday">
 


And modify your bean like this:

Code:
 public class Bean11429 {
 ...
 	public String reorderUsers() {
 		User temp = users.get(0);
 		User temp2 = users.get(1);
 		users.set(0, temp2);
 		users.set(1, temp);
 		
 		//workaround
 		if (panelSeries != null)
 			panelSeries.getSavedChildren().clear();
 
 		return null;
 	}
 	
 	private PanelSeries panelSeries;
 
 	/**
 	 * @param panelSeries
 	 *            the panelSeries to set
 	 */
 	public void setPanelSeries(PanelSeries panelSeries) {
 		this.panelSeries = panelSeries;
 	}
 
 	/**
 	 * @return the panelSeries
 	 */
 	public PanelSeries getPanelSeries() {
 		return panelSeries;
 	}
 ...
 }
 
 


And everything should work.

Unfortunatelly my problem is not fixed with the workaround. If I put your PanelSeries in a tabset, like this, the problem is still there:
Code:
 ...
 		<ice:form partialSubmit="true">
 			<ice:panelTabSet>
 				<ice:panelTab label="test">
 
 					<ice:panelSeries id="panelSeriesUsers"
 						style="width: 728px; float: left" value="#{bean11429.users}"
 						var="user">
 											
 ...
 	</ice:panelSeries>
 					<ice:messages style="color: red;" />
 				</ice:panelTab>
 			</ice:panelTabSet>
 
 		</ice:form>
 ...
 


I've tried to bind the second and the third PanelSeries and to clear their savedChildren but it doesn't work.

Can anybody help me with this? Or with my original PanelTabSet->DataTable->DataTable problem? The workaround doesn't work with PanelTabSet and I don't understand why.

Thanks,
Dumi.
Hi,

I've finally managed to obtain what I wanted.

The first issue was caused by an exception in my code that prevented the paginator to refresh. For the second one I had to make some changes in the getRowData method of the PagedListDataModel.

Thanks for you help,
Dumi.
Anybody? Any ideas? Or is there some tutorial that can help me implementing CRUD on a sinlge page with a datatable and a datapaginator? Or using a popup?

Thanks,
Dumi.
Hi,

Starting from the "Lazy Loading DataTable with JPA" tutorial (http://facestutorials.icefaces.org/tutorial/dataTable-JPA-tutorial.html) I've managed to extend its functionality with add/delete rows features. But I have problems with the data paginator and some exceptions.
If on the last page I only have one row I have the following problems:
1. If I delete a row on a page other than the last one, the data paginator doesn't refresh, even though the number of pages reduces with one;
2. If I delete the one row on the last page I get "Invalid rowIndex" exception from the getRowData() method of the PagedListDataModel.

Can anyone show me the right way to add and delete rows starting from the tutorial? And how to make the data paginator to refresh correctly?

Thanks,
Dumi.
I also get, from now and then, the following in the log:

Jul 2, 2009 2:54:44 PM org.springframework.security.event.authentication.LoggerListener onApplicationEvent
WARNING: Authentication event AuthenticationSuccessEvent: rod; details: org.springframework.security.ui.WebAuthenticationDetails@ffff6a82: RemoteIpAddress: 127.0.0.1; SessionId: 8ECDCAF901FE06FB2F0137575D51818A
Jul 2, 2009 2:54:44 PM org.springframework.security.event.authentication.LoggerListener onApplicationEvent
WARNING: Authentication event InteractiveAuthenticationSuccessEvent: rod; details: org.springframework.security.ui.WebAuthenticationDetails@ffff6a82: RemoteIpAddress: 127.0.0.1; SessionId: 8ECDCAF901FE06FB2F0137575D51818A
Jul 2, 2009 2:54:52 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher notifySessionShutdown
SEVERE: java.lang.IllegalStateException: getAttributeNames: Session already invalidated
Jul 2, 2009 2:54:52 PM com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor shutdown
INFO: Session already invalidated.


And also, from time to time, when I start the application, I enter the credentials in the login page, but I get the "User Session Expired" message. I have to press the Reload button and enter the credentials again. But then I get the "Maximum sessions of 1 for this principal exceeded":

Jul 2, 2009 3:42:55 PM org.springframework.security.event.authentication.LoggerListener onApplicationEvent
WARNING: Authentication event AuthenticationSuccessEvent: rod; details: org.springframework.security.ui.WebAuthenticationDetails@ffff6a82: RemoteIpAddress: 127.0.0.1; SessionId: BF8E6FF93FA574C67B24A1B4F7974B10
Jul 2, 2009 3:42:55 PM org.springframework.security.event.authentication.LoggerListener onApplicationEvent
WARNING: Authentication event InteractiveAuthenticationSuccessEvent: rod; details: org.springframework.security.ui.WebAuthenticationDetails@ffff6a82: RemoteIpAddress: 127.0.0.1; SessionId: BF8E6FF93FA574C67B24A1B4F7974B10
Jul 2, 2009 3:43:31 PM org.springframework.security.event.authentication.LoggerListener onApplicationEvent
WARNING: Authentication event AuthenticationFailureConcurrentLoginEvent: rod; details: org.springframework.security.ui.WebAuthenticationDetails@12afc: RemoteIpAddress: 127.0.0.1; SessionId: 279F4FBD3387A8031FEE1AA0827C05A8; exception: Maximum sessions of 1 for this principal exceeded

But this is actually what I want in these cases. So, I have to wait to be able to login again. Or to restart the application.

Any thoughts?

Thanks,
Dumi.
 
Profile for Dumi -> Messages posted by Dumi [16] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team