2 Replies Latest reply on May 14, 2012 2:39 AM by Maciej Swiderski

    Strange behavior with jbpm and mysql

    hansi007 Newbie

      My jbpm processes are made persistent with mysql. That works fine until i want to restore a session. That always fails although the session was stored correctly in the mysql database.

      That is caused by a query that wasn't created rightly by hibernate:

      Hibernate: select sessioninf0_.id as id39_0_, sessioninf0_.lastModificationDate as lastModi2_39_0_, sessioninf0_.rulesByteArray as rulesByt3_39_0_, sessioninf0_.startDate as startDate39_0_, sessioninf0_.OPTLOCK as OPTLOCK39_0_ from SessionInfo sessioninf0_ where sessioninf0_.id=?


      As hibernate mysql dialect i use:

      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" />


      Thanks for your help.



      I am using Windows 7 with mysq 5.1.11. The error was: "java.lang.RuntimeException: Could not find session data for id <session_id>"


      I hope i solved the error now:

      I changed the persistence.xml from

      <property name="hibernate.hbm2ddl.auto" value="create" />


      <property name="hibernate.hbm2ddl.auto" value="update" />


      The problem i think wasn't the "select sessioninf0_.id as id39_0_, ..." it was that with the "create" parameter all tables were cleared everytime a new process was called.