<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> <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 <salaboy@gmail.com><br><b><span style="font-weight:bold;">To:</span></b> S.M.H.Jamali <cpps98@yahoo.com>; Rules Users List <rules-users@lists.jboss.org><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"><<a rel="nofollow" ymailto="mailto:cpps98@yahoo.com" target="_blank" href="mailto:cpps98@yahoo.com">cpps98@yahoo.com</a>></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> 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="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> - CTO @ http://www.plugtree.com <br> - MyJourney @ http://salaboy.wordpress.com<div>
- Co-Founder @ http://www.jugargentina.org<br> - Co-Founder @ http://www.jbug.com.ar<br> <br> - 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>