| Author |
Message |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 05/06/2008 12:34:50
|
Baleyba
Joined: 16/11/2006 00:00:00
Messages: 110
Offline
|
Hi,
I'm using lastest SVN 16805.
I setup the folowing lines into web.xml
Code:
<context-param>
<param-name>com.icesoft.faces.connectionLostRedirectURI</param-name>
<param-value>'/index.jsp'</param-value>
</context-param>
and
Code:
<session-config>
<session-timeout>1</session-timeout>
</session-config>
So, when the minute is done, I get the following message and I don't have any redirection to the index.jsp file.
19:42:01,628 ERROR [http.servlet.SessionDispatcher] java.lang.NullPointerException
19:42:01,629 ERROR [[localhost].[/].[Blocking Servlet]] "Servlet.service()" pour la servlet Blocking Servlet a généré une exception
java.lang.IllegalStateException: "getLastAccessedTime": Session déjà invalidée
at org.apache.catalina.session.StandardSession.getLastAccessedTime(StandardSession.java:439)
at org.apache.catalina.session.StandardSessionFacade.getLastAccessedTime(StandardSessionFacade.java:84)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:227)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:221)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifySessionInitialized(SessionDispatcher.java:110)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifyIfNew(SessionDispatcher.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
19:42:01,629 ERROR [[localhost].[/].[Blocking Servlet]] "Servlet.service()" pour la servlet Blocking Servlet a généré une exception
java.lang.IllegalStateException: "getLastAccessedTime": Session déjà invalidée
at org.apache.catalina.session.StandardSession.getLastAccessedTime(StandardSession.java:439)
at org.apache.catalina.session.StandardSessionFacade.getLastAccessedTime(StandardSessionFacade.java:84)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:227)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:221)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifySessionInitialized(SessionDispatcher.java:110)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifyIfNew(SessionDispatcher.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
19:42:01,631 ERROR [[localhost].[/].[Blocking Servlet]] "Servlet.service()" pour la servlet Blocking Servlet a généré une exception
java.lang.IllegalStateException: "getLastAccessedTime": Session déjà invalidée
at org.apache.catalina.session.StandardSession.getLastAccessedTime(StandardSession.java:439)
at org.apache.catalina.session.StandardSessionFacade.getLastAccessedTime(StandardSessionFacade.java:84)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:227)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$Monitor.<init>(SessionDispatcher.java:221)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifySessionInitialized(SessionDispatcher.java:110)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.notifyIfNew(SessionDispatcher.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:82)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:46)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Do you have ideas for solving this redirection problem ?
thanks for your help and advice.
regards,
Bal.
|
JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2 |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 11/06/2008 04:15:39
|
Baleyba
Joined: 16/11/2006 00:00:00
Messages: 110
Offline
|
I'm using svn 16846
|
JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2 |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/06/2008 08:21:50
|
Baleyba
Joined: 16/11/2006 00:00:00
Messages: 110
Offline
|
Hi,
With the day svn revision: 16871
Now I'm just getting this following line:
15:19:50,832 ERROR [http.servlet.SessionDispatcher] java.lang.NullPointerException
And the session timeout redirection don't work
regards,
Bal
|
JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2 |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/06/2008 15:03:08
|
ken.fyten
Joined: 26/10/2004 00:00:00
Messages: 808
Offline
|
A few things here:
1. You need to have an ice:outputConnectionStatus component on your page in order for the "connectionLostRedirectURI" parameter to work.
2. There was a number of regression bugs in the code over the last week or so that may have been affecting your redirect behvior negatively. Our testing shows that these are resolved as of last night, so rev. #16871 should be working okay.
Can you confirm that you're using the latest code => rev. #16871 and also have the ice:outputConnectionStatus component on your page? Is your application using asynchronous update mode (default)?
Regards,
Ken
|
Ken Fyten
VP Product Development
ICEsoft Technologies, Inc. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/06/2008 15:59:17
|
ken.fyten
Joined: 26/10/2004 00:00:00
Messages: 808
Offline
|
One more thing: com.icesoft.faces.connectionLostRedirectURI doesn't apply to session expiry at all, it's only used if the connection is actually lost through an unexpected connectivity failure.
Regards,
Ken
|
Ken Fyten
VP Product Development
ICEsoft Technologies, Inc. |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 12/06/2008 17:37:14
|
Marioko
Joined: 14/11/2006 00:00:00
Messages: 125
Offline
|
i use the connectionLostRedirectURI param with this:
Code:
<error-page>
<exception-type>com.icesoft.faces.webapp.http.core.SessionExpiredException</exception-type>
<location>/index.jsp</location>
</error-page>
And works pretty nice.. when session is invalidate or is finished by timeout the application go to index.jsp
|
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 17/06/2008 09:42:27
|
Baleyba
Joined: 16/11/2006 00:00:00
Messages: 110
Offline
|
hi ken.fyten and Marioko,
ken.fyten> Yes, I'm using the ice:outputConnectionStatus component.
Now I'm using last rev.: 16912 and yes my application is using asynchronous update mode.
Thanks for solving this bug: http://jira.icefaces.org/browse/ICE-3095 => Now I don't get the exception when session expires. But always no redirection to the login page... :(
Marioko>I tried you solution, but it doesn't work in my project :(
I'm always getting this status when session is expiring... and no redirection.
Thanks for your answers
best regards,
Bal.
|
JBoss 4.2.3 | Java 1.6.0_16 | IceFaces 1.8.2 |
|
|
 |
![[Post New]](/JForum/templates/default/images/icon_minipost_new.gif) 09/07/2008 03:10:08
|
rainwebs

Joined: 24/07/2007 00:00:00
Messages: 237
Offline
|
There's a dirty workaround that we're still using to get a redirection after the session is gone:
web.xml:
Code:
<context-param>
<param-name>com.icesoft.faces.connectionLostRedirectURI</param-name>
<param-value>'expired.jsp'</param-value>
</context-param>
We use this on Glassfish, so we need a expired.jsp in every subfolder, because ICEfaces/Glassfish doesn't allow to use an absolute path here, like '/expired.jsp' (that's the dirty part ;-)). You may use an "absolute path" or "context root relative path" instead with another appserver.
expired.jsp
Code:
<%@page contentType="text/html" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Session Expired</title>
</head>
<body>
<%
if (session!=null) {
session.invalidate();
}
response.sendRedirect("../error.xhtml");
%>
</body>
</html>
We use an error page that is based on ICEfaces/Facelets here. So, the relative path from the redirect statement has to change dependent on the sub folder the jsp resides.
This solution shows the error.xhtml with every exception, session timeout, etc. Sometimes it is possible to choose the browser's page back button to have a look at an exception message.
Maybe this helps until we get a standards conforming solution ;-).
|
ICEfaces book . ICEcube . ICEfusion . ICEfaces Technical Blog Award |
|
|
 |
|
|