Marie MM [http://community.jboss.org/people/mariemm] created the discussion
"Re: TaskServer, persistence file and session" To view the discussion, visit: http://community.jboss.org/message/592661#592661 -------------------------------------------------------------- Ok, I will try one error now: I changed the example http:// Simple emergency to be able save process info in DB, with ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, config, env ); This is OK, it saves all data as expected. Then I added the task service (based on another http://community.jboss.org/people/bpmn2user/blog/2011/02/27/helloprocess-example-using-jbpm5-eclipse-plug-in HelloProcess example): TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener()); TaskServiceSession taskSession = taskService.createSession(); taskSession.addUser(new User("Admin")); taskSession.addUser(new User("kris")); When I run the test, it stops in taskSession.addUser(new User("Admin")); with A JTA EntityManager cannot use getTransaction() java.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:324) at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:324) at org.jbpm.task.service.TaskServiceSession.doOperationInTransaction(TaskServiceSession.java:707) at org.jbpm.task.service.TaskServiceSession.persistInTransaction(TaskServiceSession.java:682) at org.jbpm.task.service.TaskServiceSession.addUser(TaskServiceSession.java:69) at com.wordpress.salaboy.examples.ProcessTaskTest.humanTasksTest(ProcessTaskTest.java:83) I tried several different ways to get rid of it, nothing worked. I am using persistence unit with all classes together. See persistence.xml in attachment. Do you have any idea about this exception? Thank you a lot for your time. -------------------------------------------------------------- Reply to this message by going to Community [http://community.jboss.org/message/592661#592661] Start a new discussion in jBPM at Community [http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user