4 Replies Latest reply on Oct 29, 2012 11:03 PM by jasonjho

    JBPM Persistence Error

    khalipili

      Need help in persisting entire workflow in MySql database.

       

      I have created a sample workflow in JBPM and trying to persist the flow in MySQL database. JBPM is successfully starting the process and start persisting the session info. but once it comes to persist "Human Task" it throws error message as - "java.lang.IllegalArgumentException: Unknown entity: org.drools.persistence.processinstance.WorkItemInfo"

       

      My persistence.xml file config is :

       

      <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">

                          <provider>org.hibernate.ejb.HibernatePersistence</provider>

                          <jta-data-source>jdbc/processInstanceDS</jta-data-source>

                          <class>org.drools.persistence.session.SessionInfo</class>

                          <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>

                          <class>org.jbpm.persistence.processinstance.ProcessInstanceEventInfo</class>

                          <properties>

                                    <!-- MySQL database -->

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

                                    <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/TaskDB" />

                                    <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" />

                                    <property name="hibernate.connection.username" value="root" />

                                    <property name="hibernate.connection.password" value="password" />

                                    <property name="hibernate.max_fetch_depth" value="3" />

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

                                    <property name="hibernate.show_sql" value="true" />

                                    <!--

                                    <property name="hibernate.jndi.class" value="bitronix.tm.jndi.BitronixInitialContextFactory" />

                                     -->

                                    <property name="hibernate.transaction.manager_lookup_class"

                                              value="org.hibernate.transaction.BTMTransactionManagerLookup" />

                          </properties>

                </persistence-unit>

       

      I am using JBPM5 - 5.0-SNAPSHOT Build

       

       

      additional issue in JBPM persistence - if you have a Rule Task in workflow, rule task is getting executed but it throws below error

      "java.lang.IllegalArgumentException: Named query not found: ProcessInstancesWaitingForEvent".

       

      Please guide me to resolve these issues.

       

      Message was edited by: shashi mhatre