1 Reply Latest reply on Mar 6, 2008 3:33 AM by Martin Weiler

    Running Seam and JPBM in a separate schema

    Bas Rutten Newbie

      Hi,

      I'm using Seam 2.0.1.CR1 together with JBPM 3.2.2 and JTA. I want to keep the JBPM files in a separate database schema.

      I've set up two persistence units (one for my application tables and one for JBPM) and this all seems to work fine; the JBoss 4.2.1 application server deploys my EAR file without any problems, and my jbpm process definition is correctly deployed to the database.

      However, when I try to invoke any function that uses JBPM, I get the following error:

      Caused by: org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware
       object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to en
      list resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -79e42ac2:11ad:47ce
      d1cd:171 status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceEx
      ception: 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 warni
      ngs. tx=TransactionImple < ac, BasicAction: -79e42ac2:11ad:47ced1cd:171 status: ActionStatus.ABORT_O
      NLY >))
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94
      )
       at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionP
      rovider.java:69)
       at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
       ... 140 more
      Caused by: org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering me
      ta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabl
      ed to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: -79e42ac2:1
      1ad:47ced1cd:171 status: ActionStatus.ABORT_ONLY >)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxC
      onnectionManager.java:343)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(Ba
      seConnectionManager2.java:518)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnec
      tionManager2.java:399)
       at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.alloca
      teConnection(BaseConnectionManager2.java:842)
       at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88
      )
       ... 142 more
      Caused by: javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see t
      he previous warnings. tx=TransactionImple < ac, BasicAction: -79e42ac2:11ad:47ced1cd:171 status: Act
      ionStatus.ABORT_ONLY >
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$Transa
      ctionSynchronization.checkEnlisted(TxConnectionManager.java:744)
       at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist
      (TxConnectionManager.java:577)
       at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxC
      onnectionManager.java:337)
       ... 146 more
      


      I'm not sure what goes wrong here but it seems I cannot open a transaction or connection to the database that contains the jbpm files.

      I tried to change the "isTransactionEnabled" attribute in the jbpm.cfg.xml file from "false" to "true" but if I do this Seam complains that I should change it back to "false".

      My question: is it at all possible to use Seam + JBPM + JTA and have the JBPM data stored in a separate database schema? If so, how do I need to configure the configuration files like "jbpm.cfg.xml"???

        • 1. Re: Running Seam and JPBM in a separate schema
          Martin Weiler Apprentice

           

          Unabled to enlist resource, see the previous warnings


          This is coming from JBossTS TransactionManager used in JBoss 4.2.x, which is more strict about enlisting multiple resources in a single transaction than the previous implementation from JBoss 4.0.x. See http://wiki.jboss.org/wiki/Wiki.jsp?page=Multiple1PC for a discussion of this problem.

          To start with, I'd leave the jbpm.cfg.xml settings as they were and set the allowMultipleLastResources="true" switch in conf/jbossjta-properties.xml and see if you come around this issue. As this is not the recommended approach from a transactional perspective, you could then think of the other options as listed on the tx wiki and docs.