0 Replies Latest reply on Jun 9, 2014 12:44 PM by sgpopoff92

    jboss seam 2.2.2 no-transaction error

    sgpopoff92

      A complex application (oxAuth) based on JBOSS SEAM 2.2.2 failed the first time I'm asking for component. The problem was about getting the transaction. But this application didn't need transaction and didn't have jndi resource. I put in the components.xml what should deactivate transaction:

       

      <core:init transaction-management-enabled="false"/>

      <transaction:no-transaction />


      But this don't work, I have the error:

       

      2014-06-05 23:21:52,941 ERROR [org.jboss.seam.jsf.SeamPhaseListener] swallowing exception

      java.lang.RuntimeException: exception invoking: getTransaction

      at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:154)

      at org.jboss.seam.Component.callComponentMethod(Component.java:2275)

      at org.jboss.seam.Component.unwrap(Component.java:2301)

      at org.jboss.seam.Component.getInstance(Component.java:2044)

      at org.jboss.seam.Component.getInstance(Component.java:2003)

      at org.jboss.seam.Component.getInstance(Component.java:1997)

      at org.jboss.seam.Component.getInstance(Component.java:1970)

      at org.jboss.seam.Component.getInstance(Component.java:1965)

      at org.jboss.seam.transaction.Transaction.instance(Transaction.java:39)

       

      because of this error:

       

      Caused by: javax.naming.NamingException: Cannot create resource instance

      at         org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:116)

      at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)

      at org.apache.naming.NamingContext.lookup(NamingContext.java:843)

      at org.apache.naming.NamingContext.lookup(NamingContext.java:154)

      at org.apache.naming.NamingContext.lookup(NamingContext.java:831)

      at org.apache.naming.NamingContext.lookup(NamingContext.java:168)

      at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158)

      at javax.naming.InitialContext.lookup(InitialContext.java:409)

      at org.jboss.seam.transaction.Transaction.getUserTransaction(Transaction.java:82)

       

      This error is well known, for examle see this link. This application have been working for days, but after a lot of changes i got this problem.

       

      My question was about the no-transaction mode. How can I do make this mode working ?

       

      My configuration was based on Tomcat7 + Java 1.7 + Ubuntu Precise. The oxAuth WAR was completly recompiled from source (maven project).

      There is no @Resource in the project, no persistence in this program, as JPA, it use LDAP but in a POJO manner, I only have injection of service (@In private UserGroupService userGroupService) that use a pool of LDAP connection (com.unboundid.ldap.sdk) fashionned as an EntityManager (implements this interface).