3 Replies Latest reply on May 29, 2013 9:22 AM by manarh

    Migrating To 2.3: Transaction Issues

    leesy

      Hi all,

       

      I'm trying to bump our Seam 2.2 app up to 2.3 to take advantage of JSF2 but I'm hitting some trouble with the transactions.  Is there anything in particular I need to do to get transactions in 2.3?  Here's the rough steps I have taken so far:

      • In Maven pom
        • Changed the POM dependecies to use the Seam 2.3 BOM
        • Stripped out RichFaces (we're switching to PrimeFaces)
        • Added JSF2 dependencies.
        • Upped Hibernate to v3.5.1
      • Updated components.xml, persistence.xml, web.xml & faces-config.xml to the correct versions as listed in: http://docs.jboss.org/seam/latest/reference/en-US/html/migration23.html
      • Updated my components XML to go from: <core:init jndi-pattern="ds4/#{ejbName}/local" debug="false" /> to <core:init jndi-pattern="java:app/ds4/#{ejbName}" debug="false" />
      • Made the various web page changes required

       

      When I start up my project, I'm greeted with the following stacktrace:

       

      java.lang.RuntimeException: exception invoking: getTransaction

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

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

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

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

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

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

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

          at com.oobjects.ds4.asynchronous.cascadescript.RelatedRecordScriptManager.processNextPendingTransform(RelatedRecordScriptManager.java:79)

      ...

      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:826)

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

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

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

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

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

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

          at org.jboss.seam.transaction.Transaction.createUTTransaction(Transaction.java:74)

          at org.jboss.seam.transaction.Transaction.getTransaction(Transaction.java:47)

      ...

       

      All was fine in Seam 2.2.  Anyone got any clues what I can investigate to get this solved?  My datasource in persistence.xml has been set to use RESOURCE_LOCAL transactions.

       

      I should add that I'm attempting to run the code on Tomcat7.

       

      Cheers for any help,

      Lee