[jboss-user] [JBoss Seam] - login-required and no-conversation-view-id causing infinite
jacob.orshalick
do-not-reply at jboss.com
Fri Aug 24 15:45:44 EDT 2007
Currently, I am using Seam 2.0.0.BETA1. When I setup a page as login-required="true" in pages.xml and then specify a no-conversation-view-id an infinite redirect occurs if the session times out and a POST request is then made by the user. Here is a snippet of my pages.xml configuration:
| <pages login-view-id="/common/login.jsp">
| <!-- Security configuration -->
|
| <page view-id="*" scheme="http"/>
|
| <page view-id="/administration/*" scheme="http" login-required="true">
| <restrict>#{s:hasRole('Administrator')}</restrict>
| </page>
|
| <page view-id="/status/*" login-required="true" no-conversation-view-id="/status/search.xhtml">
| <restrict>#{s:hasRole('appRole')}</restrict>
| </page>
|
When accessing a page under /status/* the first access always redirects to login.jsp as expected. The user then logs in and continues working with the application. If the HTTP session is then allowed to timeout, a GET request will behave as expected and redirect to the login.jsp. A POST on the other hand will cause an infinite redirect with the following stacktrace:
| 2007-08-24 14:11:20,580 ERROR [org.jboss.seam.jsf.SeamPhaseListener] uncaught exception
| java.lang.IllegalStateException: Could not commit transaction
| at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:589)
| at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:325)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:226)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 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:228)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at com.bts.appserver.valves.BTSSingleSignOnValve.invoke(BTSSingleSignOnValve.java:257)
| at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
| at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.util.EmptyStackException
| at java.util.Stack.peek(Stack.java:79)
| at org.jboss.seam.transaction.Transaction.beforeCommit(Transaction.java:64)
| at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:44)
| at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:579)
| ... 38 more
| 2007-08-24 14:11:20,595 ERROR [org.jboss.seam.exception.DebugPageHandler] redirecting to debug page
| java.util.EmptyStackException
| at java.util.Stack.peek(Stack.java:79)
| at org.jboss.seam.transaction.Transaction.beforeCommit(Transaction.java:64)
| at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:44)
| at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:579)
| at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:325)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:226)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 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:228)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at com.bts.appserver.valves.BTSSingleSignOnValve.invoke(BTSSingleSignOnValve.java:257)
| at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
| at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
| at java.lang.Thread.run(Thread.java:595)
| 2007-08-24 14:11:20,595 ERROR [org.jboss.seam.jsf.SeamPhaseListener] swallowing exception
| java.lang.IllegalStateException: Could not commit transaction
| at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:589)
| at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:325)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:226)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:184)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| 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:228)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at com.bts.appserver.valves.BTSSingleSignOnValve.invoke(BTSSingleSignOnValve.java:257)
| at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
| at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:543)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.util.EmptyStackException
| at java.util.Stack.peek(Stack.java:79)
| at org.jboss.seam.transaction.Transaction.beforeCommit(Transaction.java:64)
| at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:44)
| at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:579)
| ... 38 more
|
If the no-conversation-view-id is removed, the redirect works as expected but or course an error occurs if you return to a page that requires a conversation after logging in. Thanks in advance for any help you may be able to provide.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077921#4077921
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077921
More information about the jboss-user
mailing list