1 Reply Latest reply on Jan 10, 2012 5:36 PM by Marco Rietveld

    No JTA TransactionManager found using Jpbm5 in a Jee container

    Thomas Nakken Newbie

      Hi

       

      When trying to use jbpm5.1 in weblogic with persistance inside a EJB context we get an error like:

       

      [05/01/12 02:13:14:014 CET] DEBUG impl.SessionFactoryImpl: Checking 0 named SQL queries

      [05/01/12 02:13:14:014 CET] DEBUG persistence.SingleSessionCommandService: Instantiating  JtaTransactionManager

      [05/01/12 02:13:14:014 CET] DEBUG jta.JtaTransactionManager: No JTA TransactionManager found at fallback JNDI location [java:comp/TransactionManager]

      javax.naming.NameNotFoundException: While trying to look up comp/TransactionManager in /app/ejb/service-3.0.0.jar#ProcessControllerFacadeBean.; remaining name 'comp/TransactionManager'

              at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)

              at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)

              at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)

              at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)

              at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)

              at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)

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

       

      I know we need to setup the TransactionManager but dont know how to do it. Can someone guide us i the right direction?

       

      persistence.xml looks like:

       

        <properties>

        <property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />

        <property name="hibernate.connection.autocommit" value="false" />

        <property name="hibernate.max_fetch_depth" value="3" />

        <property name="hibernate.hbm2ddl.auto" value="create" />

        <property name="hibernate.show_sql" value="true" />

        <!-- Echo all executed SQL to stdout -->

        <property name="format_sql" value="true" />

        <property name="use_sql_comments" value="true" />

        <property name="hibernate.connection.release_mode" value="after_statement" />

        <property name="hibernate.transaction.factory_class"

        value="org.hibernate.transaction.JTATransactionFactory" />

        <property name="hibernate.transaction.manager_lookup_class"

        value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />

        <property name="hibernate.current_session_context_class"

        value="org.hibernate.context.JTASessionContext" />

        <property name="hibernate.transaction.auto_close_session"

        value="false" />

       

        </properties>

       

      and the code (where we maybe need to do something to setup JTA Manager)


       

          EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.session");

          Environment env = KnowledgeBaseFactory.newEnvironment();

          env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);

       

          DO WE NEED THE LINE BELOW? I what shall it conatin in a Weblogic 10.3 EJB 3.0 environment?

           //env.set(EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager());

       

       

      Any hint and examples wold be very helpful!