<br><font size=2 face="Trebuchet MS">Hi Mauricio</font><tt><font size=2>,</font></tt>
<br><font size=2 face="Trebuchet MS">No I haven't change the Mysql driver
and neither in the pom.xml file.</font>
<br><font size=2 face="Trebuchet MS">Currently I am working on <b>MySql
5.0.9</b></font>
<br><font size=2 face="Trebuchet MS">and driver &nbsp;I am using is <b>mysql-connector-java-5.0.4-bin.</b></font>
<br>
<br><font size=2 face="Trebuchet MS">Can you tell me which version of Mysql
you are using and the name of the jar files you are using to run the project.</font>
<br><font size=2 face="Trebuchet MS">May there can be a problem in version
of some jar files I am using.</font>
<br>
<br><font size=2 face="Trebuchet MS">Jar files I am using to run the project
are : </font>
<br><font size=2 face="Trebuchet MS">1. javax.persistence.jar &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </font>
<br><font size=2 face="Trebuchet MS">2. antlr-runtime.jar</font>
<br><font size=2 face="Trebuchet MS">3. drools-api.jar</font>
<br><font size=2 face="Trebuchet MS">4. drools-compiler.jar</font>
<br><font size=2 face="Trebuchet MS">5. drools-core.jar</font>
<br><font size=2 face="Trebuchet MS">6. drools-decisiontables.jar</font>
<br><font size=2 face="Trebuchet MS">7. drools-jsr94.jar</font>
<br><font size=2 face="Trebuchet MS">8. drools-templates.jar</font>
<br><font size=2 face="Trebuchet MS">9. joda-time.jar</font>
<br><font size=2 face="Trebuchet MS">10. jsr94.jar</font>
<br><font size=2 face="Trebuchet MS">11. jxl.jar&quot;</font>
<br><font size=2 face="Trebuchet MS">12. mvel2.jar</font>
<br><font size=2 face="Trebuchet MS">13. org.eclipse.jdt.core_3.4.4.v_894_R34x.jar</font>
<br><font size=2 face="Trebuchet MS">14. xpp3.jar</font>
<br><font size=2 face="Trebuchet MS">15. xpp3_min.jar</font>
<br><font size=2 face="Trebuchet MS">16. xstream.jar</font>
<br><font size=2 face="Trebuchet MS">17. junitperf.jar</font>
<br><font size=2 face="Trebuchet MS">18.junit.jar&quot;</font>
<br><font size=2 face="Trebuchet MS">19. btm-1.3.2.jar</font>
<br><font size=2 face="Trebuchet MS">20. drools-persistence.jar</font>
<br><font size=2 face="Trebuchet MS">21. log4j-1.2.15.jar</font>
<br><font size=2 face="Trebuchet MS">22. h2-1.0.77.jar&quot;/&gt;</font>
<br><font size=2 face="Trebuchet MS">23. javassist.jar&quot;/&gt;</font>
<br><font size=2 face="Trebuchet MS">24 hibernate-annotations-3.4.0.GA.jar</font>
<br><font size=2 face="Trebuchet MS">25. hibernate-entitymanager-3.4.0.GA.jar</font>
<br><font size=2 face="Trebuchet MS">26. dom4j-1.6.1.jar</font>
<br><font size=2 face="Trebuchet MS">27. hibernate-commons-annotations-3.1.0.GA.jar</font>
<br><font size=2 face="Trebuchet MS">28. commons-logging-1.0.4.jar</font>
<br><font size=2 face="Trebuchet MS">29. jta.jar</font>
<br><font size=2 face="Trebuchet MS">30. slf4j-jdk14-1.5.2.jar</font>
<br><font size=2 face="Trebuchet MS">31. slf4j-api-1.5.2.jar</font>
<br><font size=2 face="Trebuchet MS">32. hibernate-core-3.3.1.GA.jar</font>
<br><font size=2 face="Trebuchet MS">33. commons-collections-3.2.jar</font>
<br><font size=2 face="Trebuchet MS">34. antlr-2.7.5.jar</font>
<br><font size=2 face="Trebuchet MS">35. mysql-connector-java-5.0.4-bin.jar</font>
<br>
<br><font size=2 face="Trebuchet MS">Please tell me if I am using any wrong
version of jar files. Also if possible can you please mail me your configured
project with jar files as I need this demo project working urgently.</font>
<br>
<br><font size=2 face="Trebuchet MS">Thanks &amp; Regards<br>
<br>
Pardeep Ruhil<br>
</font>
<br>
<br><tt><font size=2><br>
<br>
&gt;Hmm.. that's weird.. I have it working here..<br>
&gt;Did you change the MySQL Driver? or something in the pom.xml file?<br>
&gt;with which version of MySQL are you working?<br>
<br>
<br>
2009/10/22 &lt;Pardeep.Ruhil@lntinfotech.com&gt;<br>
<br>
&gt;&gt;<br>
&gt;&gt; Hi,<br>
&gt;&gt; I am trying to run the project given at<br>
&gt;&gt; http://blog.athico.com/2009/09/drools-flow-variable-persistence.html.<br>
&gt;&gt; I am successfully able to run the same in default H2 database,
but when I<br>
&gt;&gt; am trying to run the project, taking Mysql database for persistence.
I am<br>
&gt;&gt; not able to run the demo project as i m getting this error.<br>
&gt;<br>
&gt;<br>
&gt; ct 23, 2009 8:54:25 AM org.hibernate.impl.SessionFactoryObjectFactory<br>
&gt; addInstance<br>
&gt; INFO: Not binding factory to JNDI, no JNDI name configured<br>
&gt; Oct 23, 2009 8:54:25 AM org.hibernate.tool.hbm2ddl.SchemaExport execute<br>
&gt; INFO: Running hbm2ddl schema export<br>
&gt; Oct 23, 2009 8:54:25 AM org.hibernate.tool.hbm2ddl.SchemaExport execute<br>
&gt; INFO: exporting generated schema to database<br>
&gt; Oct 23, 2009 8:54:26 AM org.hibernate.tool.hbm2ddl.SchemaExport execute<br>
&gt; INFO: schema export complete<br>
&gt; Oct 23, 2009 8:54:26 AM bitronix.tm.BitronixTransactionManager logVersion<br>
&gt; INFO: Bitronix Transaction Manager version 1.3.2<br>
&gt; Oct 23, 2009 8:54:26 AM bitronix.tm.Configuration buildServerIdArray<br>
&gt; WARNING: cannot get this JVM unique ID. Make sure it is configured
and you<br>
&gt; only use ASCII characters. Will use IP address instead (unsafe for<br>
&gt; production usage!).<br>
&gt; Oct 23, 2009 8:54:26 AM bitronix.tm.Configuration buildServerIdArray<br>
&gt; INFO: JVM unique ID: &lt;172.17.88.140&gt;<br>
&gt; Oct 23, 2009 8:54:27 AM bitronix.tm.journal.DiskJournal open<br>
&gt; WARNING: active log file is unclean, previous server crash ?<br>
&gt; Oct 23, 2009 8:54:27 AM bitronix.tm.recovery.Recoverer run<br>
&gt; INFO: recovery committed 0 dangling transaction(s) and rolled back
0<br>
&gt; aborted transaction(s) on 1 resource(s) [jdbc/testDS1]<br>
&gt; Fri Oct 23 08:54:27 IST 2009 DEBUG: Executing XA statement: XA START<br>
&gt; 0x3137322e31372e38382e313430000001247f6c815f00000000,0x3137322e31372e38382e313430000001247f6c81ad00000002,0x42746e78<br>
&gt; Fri Oct 23 08:54:27 IST 2009 DEBUG: Executing XA statement: XA END<br>
&gt; 0x3137322e31372e38382e313430000001247f6c815f00000000,0x3137322e31372e38382e313430000001247f6c81ad00000002,0x42746e78<br>
&gt; Fri Oct 23 08:54:27 IST 2009 DEBUG: Executing XA statement: XA COMMIT<br>
&gt; 0x3137322e31372e38382e313430000001247f6c815f00000000,0x3137322e31372e38382e313430000001247f6c81ad00000002,0x42746e78<br>
&gt; ONE PHASE<br>
&gt; Kession id is1<br>
&gt; Session object<br>
&gt; isorg.drools.process.command.impl.CommandBasedStatefulKnowledgeSession@152b6f5<br>
&gt; ### Starting process ###<br>
&gt; Fri Oct 23 08:54:28 IST 2009 DEBUG: Executing XA statement: XA START<br>
&gt; 0x3137322e31372e38382e313430000001247f6c81fb00000007,0x3137322e31372e38382e313430000001247f6c821b00000009,0x42746e78<br>
&gt; x Ac = SomeString<br>
&gt; y = VARIABLE: null - This is a test Entity<br>
&gt; z = Serializable Variable: This is a test SerializableObject<br>
&gt; Fri Oct 23 08:54:28 IST 2009 DEBUG: Executing XA statement: XA END<br>
&gt; 0x3137322e31372e38382e313430000001247f6c81fb00000007,0x3137322e31372e38382e313430000001247f6c821b00000009,0x42746e78<br>
&gt; Fri Oct 23 08:54:28 IST 2009 DEBUG: Executing XA statement: XA COMMIT<br>
&gt; 0x3137322e31372e38382e313430000001247f6c81fb00000007,0x3137322e31372e38382e313430000001247f6c821b00000009,0x42746e78<br>
&gt; ONE PHASE<br>
&gt; ### Retrieving process instance ###<br>
&gt; Fri Oct 23 08:54:28 IST 2009 DEBUG: Executing XA statement: XA START<br>
&gt; 0x3137322e31372e38382e313430000001247f6c82880000000e,0x3137322e31372e38382e313430000001247f6c828800000010,0x42746e78<br>
&gt; AUTO<br>
&gt; Oct 23, 2009 8:54:28 AM org.hibernate.util.JDBCExceptionReporter<br>
&gt; logExceptions<br>
&gt; WARNING: SQL Error: 0, SQLState: null<br>
&gt; Oct 23, 2009 8:54:28 AM org.hibernate.util.JDBCExceptionReporter<br>
&gt; logExceptions<br>
&gt; SEVERE: error enlisting a JdbcConnectionHandle of a JdbcPooledConnection<br>
&gt; from datasource jdbc/testDS1 in state ACCESSIBLE wrapping<br>
&gt; com.mysql.jdbc.jdbc2.optional.MysqlXAConnection@126aaca on<br>
&gt; com.mysql.jdbc.jdbc2.optional.ConnectionWrapper@1a1b2f<br>
&gt; Oct 23, 2009 8:54:28 AM org.hibernate.event.def.DefaultLoadEventListener<br>
&gt; onLoad<br>
&gt; INFO: Error performing load command<br>
&gt; *org.hibernate.exception.GenericJDBCException*: could not load an
entity:<br>
&gt; [org.drools.persistence.session.SessionInfo#1]<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.hibernate.exception.SQLStateConverter.handledNonSpecificException(*<br>
&gt; SQLStateConverter.java:126*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.exception.SQLStateConverter.convert(*<br>
&gt; SQLStateConverter.java:114*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.exception.JDBCExceptionHelper.convert(*<br>
&gt; JDBCExceptionHelper.java:66*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.Loader.loadEntity(*Loader.java:1895*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.entity.AbstractEntityLoader.load(*<br>
&gt; AbstractEntityLoader.java:71*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.entity.AbstractEntityLoader.load(*<br>
&gt; AbstractEntityLoader.java:65*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.persister.entity.AbstractEntityPersister.load(*<br>
&gt; AbstractEntityPersister.java:3072*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(*<br>
&gt; DefaultLoadEventListener.java:434*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.def.DefaultLoadEventListener.doLoad(*<br>
&gt; DefaultLoadEventListener.java:415*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.def.DefaultLoadEventListener.load(*<br>
&gt; DefaultLoadEventListener.java:165*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(*<br>
&gt; DefaultLoadEventListener.java:223*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.event.def.DefaultLoadEventListener.onLoad(*<br>
&gt; DefaultLoadEventListener.java:126*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.impl.SessionImpl.fireLoad(*SessionImpl.java:905*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.impl.SessionImpl.get(*SessionImpl.java:842*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.impl.SessionImpl.get(*SessionImpl.java:835*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.ejb.AbstractEntityManagerImpl.find(*<br>
&gt; AbstractEntityManagerImpl.java:182*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.session.SingleSessionCommandService.&lt;init&gt;(*<br>
&gt; SingleSessionCommandService.java:153*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.jpa.impl.JPAKnowledgeServiceProviderImpl.loadStatefulKnowledgeSession(<br>
&gt; *JPAKnowledgeServiceProviderImpl.java:75*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(<br>
&gt; *JPAKnowledgeService.java:102*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.plugtree.labs.VariablePersistenceStrategiesTest.testApp(*<br>
&gt; VariablePersistenceStrategiesTest.java:158*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native
Method*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at java.lang.reflect.Method.invoke(Unknown
Source)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestCase.runTest(*TestCase.java:154*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestCase.runBare(*TestCase.java:127*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestResult$1.protect(*TestResult.java:106*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestResult.runProtected(*TestResult.java:124*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestResult.run(*TestResult.java:109*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestCase.run(*TestCase.java:118*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestSuite.runTest(*TestSuite.java:208*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at junit.framework.TestSuite.run(*TestSuite.java:203*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(*<br>
&gt; JUnit3TestReference.java:130*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(*<br>
&gt; TestExecution.java:38*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(<br>
&gt; *RemoteTestRunner.java:460*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(<br>
&gt; *RemoteTestRunner.java:673*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(*<br>
&gt; RemoteTestRunner.java:386*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(*<br>
&gt; RemoteTestRunner.java:196*)<br>
&gt; Caused by: *java.sql.SQLException*: error enlisting a JdbcConnectionHandle<br>
&gt; of a JdbcPooledConnection from datasource jdbc/testDS1 in state ACCESSIBLE<br>
&gt; wrapping com.mysql.jdbc.jdbc2.optional.MysqlXAConnection@126aaca on<br>
&gt; com.mysql.jdbc.jdbc2.optional.ConnectionWrapper@1a1b2f<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(*<br>
&gt; JdbcConnectionHandle.java:61*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.resource.jdbc.JdbcConnectionHandle.prepareStatement(<br>
&gt; *JdbcConnectionHandle.java:200*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(*<br>
&gt; AbstractBatcher.java:534*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(*<br>
&gt; AbstractBatcher.java:452*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(*<br>
&gt; AbstractBatcher.java:161*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.Loader.prepareQueryStatement(*<br>
&gt; Loader.java:1573*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.Loader.doQuery(*Loader.java:696*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(*<br>
&gt; Loader.java:259*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at org.hibernate.loader.Loader.loadEntity(*Loader.java:1881*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 34 more<br>
&gt; Caused by: *bitronix.tm.internal.BitronixSystemException*: cannot
enlist<br>
&gt; an XAResourceHolderState with uniqueName=jdbc/testDS1<br>
&gt; XAResource=com.mysql.jdbc.jdbc2.optional.MysqlXAConnection@126aaca
with<br>
&gt; XID a Bitronix XID [3137322E31372E38382E313430000001247F6C82880000000E
:<br>
&gt; 3137322E31372E38382E313430000001247F6C828800000010], error=XAER_OUTSIDE<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.BitronixTransaction.enlistResource(*<br>
&gt; BitronixTransaction.java:83*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.resource.common.TransactionContextHelper.enlist(*</font></tt>
<br><tt><font size=2>&gt; TransactionContextHelper.java:267*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; bitronix.tm.resource.common.TransactionContextHelper.enlistInCurrentTransaction(<br>
&gt; *TransactionContextHelper.java:49*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.resource.jdbc.JdbcConnectionHandle.enlistResource(*<br>
&gt; JdbcConnectionHandle.java:59*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 42 more<br>
&gt; Caused by: *com.mysql.jdbc.jdbc2.optional.MysqlXAException*: XAER_OUTSIDE:<br>
&gt; Some work is done outside global transaction<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at<br>
&gt; com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(<br>
&gt; *MysqlXAConnection.java:562*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(<br>
&gt; *MysqlXAConnection.java:545*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(*<br>
&gt; MysqlXAConnection.java:485*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.internal.XAResourceHolderState.start(*<br>
&gt; XAResourceHolderState.java:179*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.internal.XAResourceManager.enlist(*<br>
&gt; XAResourceManager.java:89*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; at bitronix.tm.BitronixTransaction.enlistResource(*<br>
&gt; BitronixTransaction.java:76*)<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; ... 45 more<br>
&gt;<br>
&gt; When I searched for this exception I got to know that : In MySql for
XA<br>
&gt; transactions &nbsp;For *XA START*&lt;http://dev.mysql.com/doc/refman/5.0/en/xa-statements.html&gt;,<br>
&gt; the JOIN and RESUME clauses are not supported.<br>
&gt; for more details<br>
&gt; http://dev.mysql.com/doc/refman/5.0/en/xa-restrictions.html.<br>
&gt; But in the class org.drools.persistence.session.<br>
&gt; SingleSessionCommandService.java we are using code for join transaction<br>
&gt; * &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this*.em.joinTransaction();<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sessionInfo = *this*.em.find(
SessionInfo.*class*, sessionId<br>
&gt; );<br>
&gt;<br>
&gt; So please tell me how to get rid of this exception. Also is there
something<br>
&gt; which I have missed for configuation with Mysql database.<br>
&gt; Please help me to get resovle this problem.<br>
&gt;<br>
&gt; Thanks &amp; Regards<br>
&gt; Pardeep Ruhil<br>
</font></tt>
<br>

<BR>
______________________________________________________________________<BR>