<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div><span>Hello all,</span></div><div><br><span></span></div><div><span>I get an exception while last line of below method executed : <br></span></div><div><br><span></span></div><div><span> public StatefulKnowledgeSession createSession() throws Exception {<br> <br> /*<br> * Create the knowledgebase using the required bpmn and drl files<br> */<br> KnowledgeBase kbase = readKnowledgeBase("HumanTask.bpmn");<br> EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" );<br> Environment env =
KnowledgeBaseFactory.newEnvironment();<br> env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );<br> env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() );<br> env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() );<br> <br> Properties properties = new Properties();<br> properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");<br> properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");<br> KnowledgeSessionConfiguration config =
KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);<br> <br> return <span style="font-weight: bold; color: rgb(192, 0, 0);">JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);</span><br> <br> }<br></span></div><div> <br>its stack-trace is : <br><br><span style="font-weight: bold;">14:26:13,111 WARN [JtaTransactionManager] Participating in existing JTA transaction, but no JTA TransactionManager or TransactionSychronizationRegistry available: </span><br style="font-weight: bold;"><span style="font-weight: bold;">java.lang.NullPointerException</span><br style="font-weight: bold;"><span style="font-weight: bold;"> at org.drools.persistence.jta.JtaTransactionManager.registerTransactionSynchronization(JtaTransactionManager.java:221)</span><br style="font-weight:
bold;"><span style="font-weight: bold;"> at org.drools.persistence.SingleSessionCommandService.registerRollbackSync(SingleSessionCommandService.java:333)</span><br style="font-weight: bold;"><span style="font-weight: bold;"> at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:123)</span><br style="font-weight: bold;"><span style="font-weight: bold;"> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)</span>...<br><br>Can anyone help me to solve this problem ?<br>Thanks in advance<span style="font-family:garamond, new york, times, serif;font-weight:bold;color:rgb(0, 0, 127);"><br>S.M.H.Jamali</span></div></div></body></html>