9 Replies Latest reply on Nov 21, 2008 5:47 AM by Ronald van Kuijk

    TX Service not configured

    Ryan Dougherty Newbie

      Hello all -

      I'm a new user of jbpm and am trying to execute the database tutorial in the user's guide --> http://docs.jboss.com/jbpm/v3.2/userguide/html/tutorial.html#databaseexample.

      I've set up my example to use MySql with the following hibernate.cfg.xml settings:

       <!-- hibernate dialect -->
       <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
      
       <!-- JDBC connection properties (begin) === -->
       <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
       <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpm32</property>
       <property name="hibernate.connection.username">jbossjbpm</property>
       <property name="hibernate.connection.password">jbossjbpm</property>
       <!-- ==== JDBC connection properties (end) -->
      
       <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
       <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
      


      I've configured my jbpm.cfg.xml file as follows:
       <jbpm-context>
       <service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory">
       <field name="isTransactionEnabled"><false /></field>
       </service>
       </jbpm-context>
      
       <string name="resource.hibernate.cfg.xml" value="jBPM.hibernate.cfg.xml" />
      


      I build the MySQL database using the following script: "http://wiki.jboss.org/wiki/attach?page=JbpmOnTomcat%2Fjbpm.jpdl.mysql.sql"

      When executing the test script I get the following error:
      14:41:40,138 ERROR [Services] problem closing service 'persistence'
      org.jbpm.JbpmException: no jbpm tx service configured
       at org.jbpm.persistence.db.DbPersistenceService.isRollbackOnly(DbPersistenceService.java:388)
       at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:210)
       at org.jbpm.svc.Services.close(Services.java:222)
       at org.jbpm.JbpmContext.close(JbpmContext.java:139)
       at test.example.workflow.HelloWorldDbTest.deployProcessDefinition(HelloWorldDbTest.java:122)
       at test.example.workflow.HelloWorldDbTest.testSimplePersistence(HelloWorldDbTest.java:88)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
       at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      


      I've tried searching for information on the TX service, but haven't found anything. Also, as you can see in the above jbpm.cfg.xml file - I tried turning off transactions by setting isTransactionEnabled to false. I still get the same exception.

      I'm using jbpm 3.2 with the following jvm:

      java version "1.5.0_11"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
      Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode)

      Any help would be greatly appreciated.

      Thanks,

      - Ryan