7 Replies Latest reply on Oct 20, 2005 3:49 AM by julien1

    UserTransaction not found in JBP 2.2.0-ALPHA and JBoss AS 4.

    jlaskowski

      Hi,

      I'm getting the following exception while deploying JBP 2.2.0-ALPHA (today's build) to JBoss AS 4.0.3. Why is that?

      22:34:32,100 INFO [SessionFactoryImpl] Checking 0 named queries
      22:34:32,421 ERROR [JTATransaction] Could not find UserTransaction in JNDI
      javax.naming.NameNotFoundException: UserTransaction not bound
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
       at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
       at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
       at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
       at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
       at javax.naming.InitialContext.lookup(InitialContext.java:351)
       at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
       at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53)
       at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:190)
       at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1197)
       at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1204)
       at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.doCheck(PersistentInstanceContainer.java:250)
       at org.jboss.portal.core.impl.model.instance.PersistentInstanceContainer.startService(PersistentInstanceContainer.java:184)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
       at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:181)
       at org.jboss.portal.common.system.AbstractJBossService.start(AbstractJBossService.java:73)
      


      and when I run /portal/

      22:39:06,355 ERROR [[PortalServletWithPathMapping]] Servlet.service() for servlet PortalServletWithPathMapping threw exception
      java.lang.NullPointerException
       at org.jboss.portal.core.model.portal.DefaultPortalCommandMapper.doMapping(DefaultPortalCommandMapper.java:74)
      


      Jacek

        • 1. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A

          what service is it ?

          it looks like the service needs hibernate that needs UserTransaction that is not yet bound into JNDI.

          • 2. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A

            Did you run 'build' under the "build" directory and then do a 'build' under the "core" directory in the portal? I had "JTA" problems before when deploying and trying out 2.2. However, when I did a 'build' in the "core" directory, the problems were resolved.

            JBoss Portal 2.2 will have its official release in November. Consequently, I am still using Portal 2.0

            • 3. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A
              jlaskowski

               

              "julien@jboss.com" wrote:
              what service is it ?

              it looks like the service needs hibernate that needs UserTransaction that is not yet bound into JNDI.


              From the stack trace it looks like it's the PersistentInstanceContainer service.

              Jacek

              • 4. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A
                jlaskowski

                 

                "conkan" wrote:
                Did you run 'build' under the "build" directory and then do a 'build' under the "core" directory in the portal? I had "JTA" problems before when deploying and trying out 2.2. However, when I did a 'build' in the "core" directory, the problems were resolved.

                JBoss Portal 2.2 will have its official release in November. Consequently, I am still using Portal 2.0


                Are you sure that build target is available in core and build? When I run your suggested build target, I got "Target `build' does not exist in this project."?

                I'm building the sources as follows:

                ant -Dportal.deploy.dir=portal -f build/build.xml clean exploded-deploy


                in the main directory of JBP.

                Jacek

                • 5. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A
                  willimur

                  If it helps, I'm getting an identical error message. I have a EJB/Hibernate application which runs fine under 4.0.2, but deploying it to 4.0.3 isn't working. The first moment my app tries to do a beginTransaction() call I get the same error:

                  Caused by: org.hibernate.TransactionException: Could not find UserTransaction in JNDI:
                   at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:64)
                   at org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:53)
                   at org.hibernate.jdbc.JDBCContext.getTransaction(JDBCContext.java:190)
                   at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1197)
                   at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1204)
                   at com.prytaniagroup.dataaction.HibernateUtil.beginTransaction(HibernateUtil.java:75)
                   ... 27 more
                  Caused by: javax.naming.NameNotFoundException: UserTransaction not bound
                   at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
                   at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
                   at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
                   at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:610)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:701)
                   at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
                   at javax.naming.InitialContext.lookup(InitialContext.java:351)
                   at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
                   ... 32 more


                  • 6. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A

                    I am getting the same error willimur had. EJB3 + hibernate 3 on JBoss4.0.3. Reading from the hibernate is ok, when using transaction the jboss gives such error.

                    • 7. Re: UserTransaction not found in JBP 2.2.0-ALPHA and JBoss A