1 Reply Latest reply on Dec 30, 2006 12:07 PM by smichea

    HibernateException: null index column for collection

      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");


      I then obtain the following exception :

      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)
      ...
      


      I tried several process with no success... and can't figure out where is the problem.

      My config : WinXP/JBoss4.0.4GA/JBPM3.1/MySQL

      jbpm.cfg.xml :
      <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>
      


      For Hibernate I tried both MySQLDialect and MySQLInnoDBDialect

      Thanks in advance,
      Sebastien