1 Reply Latest reply on Jun 10, 2009 5:25 PM by Leo van den berg

    EjbSynchronizations remote not bound

    Jesse Sweetland Newbie
      I'm building a Seam 2.1.1 application with remote, clustered Stateful session beans on JBoss EAP 4.3.0.  Because I'm using remote interfaces, my jndi-pattern is "foo/#{ejbName}/remote".  However, it looks like the EjbSynchronizations component is an EJB with no remote interface, and so is bound using the pattern "foo/#{ejbName}/local".  Subsequently I get the following error when I try to access my Seam components:

      11:05:06,054 ERROR [SeamPhaseListener] swallowing exception
      java.lang.IllegalStateException: Could not start transaction
              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:599)
              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:584)
              at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:325)
              at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:142)
              at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
              at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:103)
              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.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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:173)
              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:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              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:241)
              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:447)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.transaction.synchronizations
              at org.jboss.seam.Component.newInstance(Component.java:2106)
              at org.jboss.seam.Component.getInstance(Component.java:1988)
              at org.jboss.seam.Component.getInstance(Component.java:1967)
              at org.jboss.seam.Component.getInstance(Component.java:1961)
              at org.jboss.seam.Component.getInstance(Component.java:1956)
              at org.jboss.seam.transaction.AbstractUserTransaction.getSynchronizations(AbstractUserTransaction.java:79)
              at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:40)
              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:594)
              ... 41 more
      Caused by: javax.naming.NameNotFoundException: remote not bound
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:581)
              at org.jnp.server.NamingServer.getBinding(NamingServer.java:589)
              at org.jnp.server.NamingServer.getObject(NamingServer.java:595)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:342)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:316)
              at org.jnp.server.NamingServer.lookup(NamingServer.java:316)
              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:392)
              at org.jboss.seam.Component.instantiateSessionBean(Component.java:1367)
              at org.jboss.seam.Component.instantiate(Component.java:1331)
              at org.jboss.seam.Component.newInstance(Component.java:2084)
              ... 48 more


      As far as clustering goes, if I were to also implement a local interface on my SLSBs and configure Seam to use the "foo/#{ejbName}/local" JNDI pattern, would that cause any problems?  Is the EjbSynchronizations component critical, or can I safely remove it?  Is there any way to override the JNDI name for this component in components.xml so that it doesn't default to the JNDI pattern I specified?

      I suppose I could use @JNDIName on all of my remote SFSBs and force them to bind to "foo/#{ejbName}/local", but that seems a little heavy handed.  Another solution might be to override this component with a SFSB that extends EjbSynchronizations and implements a remote interface.

      From what Google tells me, this doesn't seem to be a common issue, but has anyone else seen this or know of a good solution?

      Thanks,

      Jesse