<html><body><div style="color:#000; background-color:#fff; font-family:tahoma, new york, times, serif;font-size:10pt"><div style="font-family: tahoma, new york, times, serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><div id="yiv2031764326"><div><div style="color:#000;background-color:#fff;font-family:tahoma, new york, times, serif;font-size:10pt;"><div><span>i share </span>persistence.xml<span> <a rel="nofollow" target="_blank" href="http://pastebin.com/gxBqtzwW">here</a></span></div><div><span>yes i configure the persistence with JTA but i dont sure about correctness of it !<br></span></div><div>&nbsp;<br>i have some other files beside persistence.xml that maybe can help : <br><a rel="nofollow" target="_blank" href="http://pastebin.com/PB2xmXCX">ormTask.xml</a><br><a rel="nofollow" target="_blank" href="http://pastebin.com/24RNTq85">JBPMorm.xml</a><br><a rel="nofollow" target="_blank"
 href="http://pastebin.com/y6xy4AUu">jboss-web.xml</a><br><br>Thanks <br></div><div><span style="font-family:garamond, new york, times, serif;font-weight:bold;color:rgb(0, 0, 127);">S.M.H.Jamali</span><br></div><div style="font-family:tahoma, new york, times, serif;font-size:10pt;"><div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Mauricio Salatino &lt;salaboy@gmail.com&gt;<br><b><span style="font-weight:bold;">To:</span></b> S.M.H.Jamali &lt;cpps98@yahoo.com&gt;; Rules Users List &lt;rules-users@lists.jboss.org&gt;<br><b><span style="font-weight:bold;">Sent:</span></b> Wednesday, November 9, 2011 8:22 PM<br><b><span style="font-weight:bold;">Subject:</span></b> Re: [rules-users] Human Task - ERROR : JPAKnowledgeService.newStatefulKnowledgeSession ...<br></font><br>
<div id="yiv2031764326">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="yiv2031764326gmail_quote">2011/11/9 S.M.H.Jamali <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:cpps98@yahoo.com" target="_blank" href="mailto:cpps98@yahoo.com">cpps98@yahoo.com</a>&gt;</span><br>

<blockquote class="yiv2031764326gmail_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>&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 class="yiv2031764326HOEnZb"><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 rel="nofollow" ymailto="mailto:rules-users@lists.jboss.org" target="_blank" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a rel="nofollow" target="_blank" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>&nbsp;- CTO @ http://www.plugtree.com&nbsp; <br>&nbsp;- MyJourney @ http://salaboy.wordpress.com<div>

&nbsp;- Co-Founder @ http://www.jugargentina.org<br>&nbsp;- Co-Founder @ http://www.jbug.com.ar<br>&nbsp;<br>&nbsp;- Salatino "Salaboy" Mauricio -</div>

<br>
</div>
</div><br><br></div></div></div></div></div><br>_______________________________________________<br>rules-users mailing list<br><a ymailto="mailto:rules-users@lists.jboss.org" 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><br></div></div></div></body></html>