2 Replies Latest reply on Aug 12, 2011 9:59 AM by Pierpaolo Lombardi

    Startup problem cause java.lang.ClassNotFoundException: org.drools.persistence.processinstance.WorkItemInfo

    Pierpaolo Lombardi Newbie

      Hi, I'm new in the JBOSS world so I'm sorry for my (stupid?) questions

      I installed JBoss 5.1 and jbpm-gwt-console.war and jbpm-gwt-console-server.war (JBPM 5.1).

      The Drools versions is the 5.2 (this is provided in bundle with the JBPM downloaded stuff).

       

      Unfortunately, during JBoss startup the following error occurs:

       

      Caused by: java.lang.ClassNotFoundException: org.drools.persistence.processinstance.WorkItemInfo

       

      I checked in the drools core jar provided by jbpm and this class is not present.

      I added drools-persistence-jpa-5.0.1.jar (cause this jar contains the missing class) and this time the following error occurs:

       

      java.lang.NoClassDefFoundError: org/drools/marshalling/impl/ProcessInstanceMarshaller

       

      cause there is no suck class in the Drools jars. So I added also drools-core-5.0.1.jar (cause it contains the last missing class) and no problem occurred during startup.In this case, when I ask for the service http://localhost:8080/gwt-console-server/rs/process/definitions the following error occurs:

       

      java.lang.NoSuchMethodError: org.drools.util.ChainedProperties.<init>(Ljava/lang/String;Ljava/lang/ClassLoader;Z)V

       

      It seems as a different version of the Drools library is used instead of the expected one (probably this is due to the adding of the jars I did to solve the first two missing class exception).

       

      I have no idea how I can solve it...Any help will be appreciate.

      Thanks  in advance,

      Pierpaolo

        • 1. Re: Startup problem cause java.lang.ClassNotFoundException: org.drools.persistence.processinstance.WorkItemInfo
          Pierpaolo Lombardi Newbie

          I just found out there is a persistence.xml file in the folder jbpm-gwt-console-server.war\WEB-INF\classes\META-INF containing the following rows (as provided by the jBPM installation):

           

                  <class>org.drools.persistence.session.SessionInfo</class>
                  <class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
                  <class>org.drools.persistence.processinstance.WorkItemInfo</class>
                  <class>org.jbpm.process.audit.ProcessInstanceLog</class>
                  <class>org.jbpm.process.audit.NodeInstanceLog</class>
                  <class>org.jbpm.process.audit.VariableInstanceLog</class>

           

          Of course the SessionInfo and WorkItemInfo are specified in a bad path.

          I modified this file and now I have only two rows:

           

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

                 <class>org.drools.persistence.info.WorkItemInfo</class>

           

          I started JBoss removing all of the Drools5.0.1 jars I added before and no error occurs like before but another error arose:

           

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

           

          I think the problem is the missing of a row related to the ProcessInstanceInfo but actually I cannot find it in the Drools jars.

          What did you change in this file according to Drools5.2?

           

          Thanks,

          Pierpaolo

          • 2. Re: Startup problem cause java.lang.ClassNotFoundException: org.drools.persistence.processinstance.WorkItemInfo
            Pierpaolo Lombardi Newbie

            Other update for you

             

            I added the followinf rows in the file jboss-5.1.0.GA\server\default\deploy\jbpm-gwt-console-server.war\WEB-INF\classes\META-INF

             

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

            <class>org.drools.persistence.info.WorkItemInfo</class>

            <class>org.jbpm.process.audit.ProcessInstanceLog</class>

            <class>org.jbpm.process.audit.NodeInstanceLog</class>

            <class>org.jbpm.process.audit.VariableInstanceLog</class>

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

             

             

            and no error during startup

            When I click for http://localhost:8080/gwt-console-server/rs/process/definitions I got the error:

             

            15:55:08,229 WARNING [JDBCExceptionReporter] SQL Error: 23502, SQLState: 23502
            15:55:08,229 SEVERE [JDBCExceptionReporter] NULL not allowed for column "DIRTY"; SQL statement:
            insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?) [23502-158]
            15:55:08,245 SEVERE [SingleSessionCommandService] Could not commit session
            javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not insert: [org.drools.persisten
            ce.info.SessionInfo]

             

             

            Why suck a behavior?

             

            I hope this can help someone of you

             

            Regards,

            Pierpaolo