[jboss-user] [jBPM] - Re: How to continue process in a web application
Jo Blithe
do-not-reply at jboss.com
Fri Jul 22 11:53:20 EDT 2011
Jo Blithe [http://community.jboss.org/people/johnesky] created the discussion
"Re: How to continue process in a web application"
To view the discussion, visit: http://community.jboss.org/message/617073#617073
--------------------------------------------------------------
Thanks Demian. I got this error using JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env ). What do you think I am doing wrong to get Java null pointer exception:
Exception in thread "main" java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:130)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:54)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:109)
at com.sample.ProcessTest.main(ProcessTest.java:69)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:116)
... 3 more
Caused by: java.lang.RuntimeException: Could not commit session or rollback
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:133)
... 8 more
Caused by: java.lang.RuntimeException: Unable to rollback transaction
at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:184)
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:131)
... 8 more
Caused by: java.lang.NullPointerException
at org.drools.persistence.jta.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
... 9 more
Here is part of my code below:
KnowledgeBase kbase = readKnowledgeBase();
EntityManagerFactory emf =
Persistence.createEntityManagerFactory( "org.jbpm.task" );
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, emf );
StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession( kbase, null, env );
ksession.startProcess("com.sample.bpmn.hello");
Thanks again for your time.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/617073#617073]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110722/d64edaec/attachment.html
More information about the jboss-user
mailing list