Hello,
In a method of a stateless EJB3 I deployed the hello world process (of StarterKit) in a MySQL database, then manage to create an instance for it.
Later in another function, I try to create a process instance with those 2 instructions
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext(); ProcessInstance processInstance = jbpmContext.newProcessInstance("test");
javax.ejb.EJBException: org.hibernate.HibernateException: null index column for collection: org.jbpm.graph.def.ProcessDefinition.definitions at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69) ... ... at org.hibernate.collection.PersistentMap.values(PersistentMap.java:198) at org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:103) at org.jbpm.JbpmContext.newProcessInstance(JbpmContext.java:371) ...
<jbpm-configuration> <jbpm-context> <service name="persistence"> <factory> <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory"> <field name="isTransactionEnabled"><false /></field> </bean> </factory> </service> <service name='message' factory='org.jbpm.msg.db.DbMessageServiceFactory' /> <service name='scheduler' factory='org.jbpm.scheduler.db.DbSchedulerServiceFactory' /> <service name='logging' factory='org.jbpm.logging.db.DbLoggingServiceFactory' /> <service name='authentication' factory='org.jbpm.security.authentication.DefaultAuthenticationServiceFactory' /> </jbpm-context> </jbpm-configuration>
Solved: the problem was that I did not close the JBPMContext in the method were I deployed the process.
This may help some of you.