1 Reply Latest reply on Jul 9, 2012 7:42 AM by Maciej Swiderski

    Errors testing Hello Process Example with Persistence (jBPM 5.3)

    dvdscr Newbie


      I installed for the first time jBPM 5.3 on Tomcat with Oracle 10g, and with this installation I created database schema on my Oracle schema.


      Then I installed on my Eclipse plugin to create a new jBPM project a to use designer. Then i'd like to try it with this sample:



      I've two problems executing it, one in orm.xml file, one creating KnowledgeSession.


      The orm.xml file seems not updated, in fact i modify it in two parts (number of arguments of TaskSummary, escalated in Deadline is not boolean), however i've this error:

      652  05/07 17:04:02,498[main] ERROR hibernate.impl.SessionFactoryImpl.<init>  - Error in named query: ProcessInstancesWaitingForEvent

      org.hibernate.hql.ast.QuerySyntaxException: ProcessInstanceInfo is not mapped [select processInstanceInfo.processInstanceId from ProcessInstanceInfo processInstanceInfo where :type in elements(processInstanceInfo.eventTypes)]


      I've the error on this named-query:


      <named-query name="ProcessInstancesWaitingForEvent">
          ProcessInstanceInfo processInstanceInfo
          :type in elements(processInstanceInfo.eventTypes)



      If i delete this named-query the initialization seems to go, but i've this other error:

      Hibernate: select SESSIONINFO_ID_SEQ.nextval from dual

      843  05/07 15:15:24,278[main] ERROR hibernate.util.JDBCExceptionReporter.logExceptions  - error enlisting a JdbcConnectionHandle of a JdbcPooledConnection from datasource jdbc/testDS1 in state ACCESSIBLE with usage count 1 wrapping oracle.jdbc.xa.client.OracleXAConnection@d3c9557 on oracle.jdbc.driver.OracleConnection@470898b

      java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException

          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:143)

          at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:67)

          at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)

          at com.sample.ProcessTestTask.createKnowledgeSession(ProcessTestTask.java:168)

          at com.sample.ProcessTestTask.main(ProcessTestTask.java:114)


      I don't understand why ProcessInstanceInfo seems to be not mapped and also why a sequence can do this error.


      Can you help me, please?

        • 1. Re: Errors testing Hello Process Example with Persistence (jBPM 5.3)
          Maciej Swiderski Master

          Make sure you have proper definitions in your persistence xml, here is a sample from default installation (not complete just the relevant part, I think):



            <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
          <!-- start bold -->
          <!-- end  bold -->


          Important element is in bold, make sure you have it there and it is accessible as that file defines ProcessInstanceInfor entity. This is valid for hibernat 3.x usage (JPA1).