2 Replies Latest reply on Aug 2, 2007 3:49 AM by mailinator

    JBPM Process Instance - Could not enlist in transaction on e

    mailinator Novice


      i'm using jbpm to work with workflows.
      Here is my problem :
      i'm deploying my process definition fine with the plugin. I check in the database and everything is fine.
      But when trying to acces that process definition from my webapp, i encounter some issues.

      I believe that this is because of misconfiguration of either datasources or transaction manager.
      Sadly i dont know enough to find some solution to that.

      Here is my jbpm code :

      JbpmConfiguration jbpmConfiguration=JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      try {
      String processName = "Acces";
      ProcessInstance processInstance = jbpmContext.newProcessInstance(processName);
      } finally {

      In my jbpm-ds.xml :


      In the logs of JBOSS, i have this :

      11:43:19,872 INFO [TransactionFactoryFactory] Using default transaction strateg
      y (direct JDBC transactions)
      11:43:19,887 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup
      (in JTA environment, use of read-write or transactional second-level
      cache is not recommended)
      11:43:19,887 INFO [SettingsFactory] Automatic flush during beforeCompletion():

      I believe there is a link between this and my exception :

      org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: a623635:94c:46adb26e:56 status: ActionStatus.ABORT_ONLY >)

      Does anyone know about this ?



        • 1. Re: JBPM Process Instance - Could not enlist in transaction
          Edward Staub Expert

          The only reasons the hibernate.cfg.xml file wouldn't be found is if there's another one on your classpath, or if jbpm.cfg.xml is pointing at another file.

          How do you know it's not being found?

          Go to your local bookstore and read the new Hibernate book chapter on configuration. Or browse online, but that's so old-school ;-) You need to get some background so that you know what you're doing.

          For myself, I'm using a Oracle via a jndi datasource under WebLogic:

          <!-- DataSource properties (begin) -->
           <property name="hibernate.connection.datasource">jbpmDataSource</property>
           <!-- DataSource properties (end) -->
          and the Weblogic transaction manager:
           <!-- JTA transaction properties (begin) -->
           <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
           <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WeblogicTransactionManagerLookup</property>
           <!-- JTA transaction properties (end) -->

          -Ed Staub

          • 2. Re: JBPM Process Instance - Could not enlist in transaction
            mailinator Novice

            Hi Ed,

            thanks for helping.

            I think that the file is not found or used because of the logs :
            No TransactionManagerLookup configured although i have those lines in my config file :

            <!-- JTA transaction properties (begin) -->
            <property name=hibernate.transaction.factory_class>org.hibernate.transaction.JTATransactionFactory
            <property name=hibernate.transaction.manager_lookup_class>org.hibernate.transaction.JBossTransactionManagerLookup
            <!-- JTA transaction properties (end) -->

            I'm using a oracle database with jboss (i failed to make it running on weblogic :( )

            I found a way to make the exception disappear (i add a <property name=com.arjuna.ats.jta.allowMultipleLastResources value=TRUE> in jbossjta-properties.xml but i believe its not the solution for long run)