Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-2272

"EjbSynchronizations not bound" when deploying "jboss-seam.jar" in the folder named "jboss-seam.jar"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • LATER
    • eclipse-migration
    • None

      When JBoss Tools deploying my seam project, file jboss-seam.jar is located at:
      server/default/deploy
      ----------------------------MyProject-ear.ear (folder)
      ------------------------------------------jboss-seam.jar (folder, not .jar file)
      ---------------------------------------------------------------jboss-seam.jar

      So, it print out these exceptions when I visite the home.seam:

      14:40:53,090 INFO [Contexts] starting up: org.jboss.seam.security.identity
      14:40:53,814 INFO [RuleBase] parsing rules: /security.drl
      14:40:54,199 INFO [Contexts] starting up: org.jboss.seam.web.session
      14:40:54,214 ERROR [SeamPhaseListener] uncaught exception
      java.lang.IllegalStateException: Could not start transaction
      at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:592)
      at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:323)
      at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
      at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      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:68)
      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.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      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.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:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      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)
      Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.transaction.synchronizations
      at org.jboss.seam.Component.newInstance(Component.java:1970)
      at org.jboss.seam.Component.getInstance(Component.java:1873)
      at org.jboss.seam.Component.getInstance(Component.java:1852)
      at org.jboss.seam.Component.getInstance(Component.java:1846)
      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:587)
      ... 43 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.server.NamingServer.lookup(NamingServer.java:270)
      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:1287)
      at org.jboss.seam.Component.instantiate(Component.java:1273)
      at org.jboss.seam.Component.newInstance(Component.java:1966)
      ... 49 more
      14:40:54,233 ERROR [SeamPhaseListener] swallowing exception

      ------------------------------------------------------------------
      Here is my application.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <application 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/application_5.xsd"
      version="5">

      <display-name>FDose-ear</display-name>

      <module>
      <web>
      <web-uri>FDose.war</web-uri>
      <context-root>/FDose</context-root>
      </web>
      </module>

      <module>
      <ejb>FDose-ejb.jar</ejb>
      </module>

      <module>
      <ejb>jboss-seam.jar</ejb>
      </module>

      </application>
      ------------------------------------------------------------------

      My components.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <components xmlns="http://jboss.com/products/seam/components"
      xmlns:core="http://jboss.com/products/seam/core"
      xmlns:persistence="http://jboss.com/products/seam/persistence"
      xmlns:drools="http://jboss.com/products/seam/drools"
      xmlns:bpm="http://jboss.com/products/seam/bpm"
      xmlns:security="http://jboss.com/products/seam/security"
      xmlns:mail="http://jboss.com/products/seam/mail"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:transaction="http://jboss.com/products/seam/transaction"
      xsi:schemaLocation=
      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
      http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
      http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.0.xsd
      http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
      http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
      http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.0.xsd
      http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.0.xsd
      http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">

      <core:init debug="true" jndi-pattern="@jndiPattern@"/>

      <core:manager concurrent-request-timeout="500"
      conversation-timeout="120000"
      conversation-id-parameter="cid"
      parent-conversation-id-parameter="pid"/>

      <persistence:managed-persistence-context name="entityManager"
      auto-create="true"
      persistence-unit-jndi-name="java:/FDoseEntityManagerFactory"/>

      <drools:rule-base name="securityRules">
      <drools:rule-files>
      <value>/security.drl</value>
      </drools:rule-files>
      </drools:rule-base>

      <security:identity security-rules="#

      {securityRules}

      " authenticate-method="#

      {authenticator.authenticate}

      " remember-me="true"/>

      <event type="org.jboss.seam.security.notLoggedIn">
      <action execute="#

      {redirect.captureCurrentView}

      "/>
      </event>
      <event type="org.jboss.seam.security.loginSuccessful">
      <action execute="#

      {redirect.returnToCapturedView}

      "/>
      </event>

      <mail:mail-session host="localhost" port="2525" username="test" password="test" />

      <!-- For use with jBPM pageflow or process management -->
      <!--
      <bpm:jbpm>
      <bpm:process-definitions></bpm:process-definitions>
      <bpm:pageflow-definitions></bpm:pageflow-definitions>
      </bpm:jbpm>
      -->

      <transaction:ejb-transaction/>
      </components>
      ------------------------------------------------------------------

      My -ds.xml:
      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE datasources
      PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
      "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">

      <datasources>

      <xa-datasource>
      <jndi-name>TestDatasource</jndi-name>
      <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/test</xa-datasource-property>
      <xa-datasource-property name="User">test</xa-datasource-property>
      <xa-datasource-property name="Password">test</xa-datasource-property>
      <track-connection-by-tx/>
      <new-connection-sql>set autocommit=1</new-connection-sql>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
      <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
      <metadata>
      <type-mapping>mySQL</type-mapping>
      </metadata>
      </xa-datasource>

      <xa-datasource>
      <jndi-name>TestUserDatasource</jndi-name>
      <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
      <xa-datasource-property name="URL">jdbc:mysql://localhost:3306/user_test</xa-datasource-property>
      <xa-datasource-property name="User">test</xa-datasource-property>
      <xa-datasource-property name="Password">test</xa-datasource-property>
      <track-connection-by-tx/>
      <new-connection-sql>set autocommit=1</new-connection-sql>
      <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
      <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
      <metadata>
      <type-mapping>mySQL</type-mapping>
      </metadata>
      </xa-datasource>
      </datasources>

      This issue could be fixed if I move file "jboss-seam.jar" out of folde "jboss-seam.jar".
      What I have to do if I want to deploy my application as archived .ear file, not as folder?

              Unassigned Unassigned
              bobrowley_jira Ton Nguyen Hoang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: