Redirect Loop with lots of exceptions from seam-booking example
npacemo Aug 29, 2008 11:58 AMI'm trying to get running the seam-booking example inside Eclipse Ganymede with the new alpha release of JBoss Tools and JBoss Seam 2.0.2.SP1 and here's the structure of the projects I've setup:
-booking (Seam Web Project) -src -messages.properties -resources (this is the web content folder) +css +exp +img -META-INF -MANIFEST.MF -WEB-INF +lib -components.xml -faces-config.xml -jboss-web.xml -pages.xml -web.xml -*.xhtml ... (xhtmls go here) -booking-ear (Java EAR Project) -EarContent -META-INF -application.xml -jboss-app.xml -MANIFEST.MF -*.jar ... (other needed jars go here) -resources -booking-ds.cml -booking-ejb (EJB3 Project) -ejbModule -org.jboss.seam.example.booking -*.java ... (all java classes go here) -META-INF -ejb-jar.xml -MANIFEST.MF -persistence.xml -components.properties -import.sql -seam.properties -booking-ejb.launch -hibernate-console.properties
This is basically the standard structure you get when you're doing a setup of a Seam Web Project deployed as an EAR. I've just added the classes from the seam-booking example, as well as the xhtmls and all configuration files (just slightly edited them to conform with my local database connection).
The deployment of the application looks fine in the logs, have a few warnings though:
10:56:28,879 WARN [MainDeployer] Found non-jar deployer for jboss-seam.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer] 10:56:29,160 WARN [DeploymentInfo] Only the root deployment can set the loader repository, ignoring config=LoaderRepositoryConfig(repositoryName: seam.jboss.org:loader=booking, repositoryClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3, configParserClassName: org.jboss.mx.loading.HeirarchicalLoaderRepository3ConfigParser, repositoryConfig: java2ParentDelegation=false) 10:56:29,453 WARN [MainDeployer] Found non-jar deployer for jboss-seam.jar: MBeanProxyExt[jboss.ejb3:service=EJB3Deployer] ... 10:56:32,832 WARN [SessionFactoryObjectFactory] InitialContext did not implement EventContext
The application is up and running, but when I'm trying to access http://localhost:8080/booking I'm getting a redirect loop error in the browser - no error page, no nothing, just exceptions in the log. The exception appear to be caused recursively, because they're repeating until the Console in the Eclipse is full with output, but there is a repeating pattern:
11:00:19,567 ERROR [SeamPhaseListener] uncaught exception java.lang.IllegalStateException: Could not commit transaction at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613) at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:341) at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:241) at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192) at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114) at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:104) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) 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:68) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182) 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:613) Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.transaction.synchronizations at org.jboss.seam.Component.newInstance(Component.java:1986) at org.jboss.seam.Component.getInstance(Component.java:1876) at org.jboss.seam.Component.getInstance(Component.java:1855) at org.jboss.seam.Component.getInstance(Component.java:1849) at org.jboss.seam.transaction.AbstractUserTransaction.getSynchronizations(AbstractUserTransaction.java:79) at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:48) at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:603) ... 40 more Caused by: javax.naming.NameNotFoundException: EjbSynchronizations not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:529) at org.jnp.server.NamingServer.getBinding(NamingServer.java:537) at org.jnp.server.NamingServer.getObject(NamingServer.java:543) at org.jnp.server.NamingServer.lookup(NamingServer.java:267) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) at javax.naming.InitialContext.lookup(InitialContext.java:351) at org.jboss.seam.Component.instantiateSessionBean(Component.java:1290) at org.jboss.seam.Component.instantiate(Component.java:1276) at org.jboss.seam.Component.newInstance(Component.java:1970) ... 46 more 11:00:19,591 ERROR [CachedConnectionValve] Application error: Faces Servlet did not complete its transaction
Thank you in advance for any suggestions or requests to put additional information to solve this problem.
Best Regards