<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>&nbsp;&nbsp;&nbsp; public StatefulKnowledgeSession createSession() throws Exception {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /*<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;* Create the knowledgebase using the required bpmn and drl files<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;*/<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; KnowledgeBase kbase = readKnowledgeBase("HumanTask.bpmn");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; EntityManagerFactory emf = Persistence.createEntityManagerFactory( "org.jbpm.persistence.jpa" );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Environment env =
 KnowledgeBaseFactory.newEnvironment();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; env.set( EnvironmentName.TRANSACTION_MANAGER, TransactionManagerServices.getTransactionManager() );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() );<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Properties properties = new Properties();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; properties.put("drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; properties.put("drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory");<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; KnowledgeSessionConfiguration config =
 KnowledgeBaseFactory.newKnowledgeSessionConfiguration(properties);<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return <span style="font-weight: bold; color: rgb(192, 0, 0);">JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env);</span><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; }<br></span></div><div>&nbsp;<br>its stack-trace is : <br><br><span style="font-weight: bold;">14:26:13,111 WARN&nbsp; [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;">&nbsp;&nbsp;&nbsp; at org.drools.persistence.jta.JtaTransactionManager.registerTransactionSynchronization(JtaTransactionManager.java:221)</span><br style="font-weight:
 bold;"><span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; at org.drools.persistence.SingleSessionCommandService.registerRollbackSync(SingleSessionCommandService.java:333)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; at org.drools.persistence.SingleSessionCommandService.&lt;init&gt;(SingleSessionCommandService.java:123)</span><br style="font-weight: bold;"><span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; 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>