You will need to solve that problem. looks like a configuration problem, can you share the persistence.xml file? did you configure persistence with JTA?<div>Cheers<br><br><div class="gmail_quote">2011/11/9 S.M.H.Jamali <span dir="ltr"><<a href="mailto:cpps98@yahoo.com">cpps98@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><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 class="HOEnZb"><font color="#888888"><span style="font-family:garamond, new york, times, serif;font-weight:bold;color:rgb(0, 0, 127)"><br>
S.M.H.Jamali</span></font></span></div></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br> - CTO @ <a href="http://www.plugtree.com" target="_blank">http://www.plugtree.com</a> <br> - MyJourney @ <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><div>
- Co-Founder @ <a href="http://www.jugargentina.org" target="_blank">http://www.jugargentina.org</a><br> - Co-Founder @ <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br> <br> - Salatino "Salaboy" Mauricio -</div>
<br>
</div>