3 Replies Latest reply: Sep 27, 2012 3:55 AM by Avneesh Sisodia RSS

Having problems in configuring jBPM persistence on AS 7.1.0 Final

Vimal Kansal Newbie

Hi,

 

I am trying to configure jBPM 5.3 persistence configured and having troubles, any help will be gretaly appreciated. So here is what I am doing :

 

My use case involves building a JEE6 web app with jBPM 5.2 engine embedded in it.

I am using JBoss Developer Studio 5.0 Beta 3 to generate a JEE6 web app using one of the maven plugins. Once the app is generated, I have added dependencies on jbpm-bpmn2 and jbpm-persistence-jpa. I have also updated the persistence.xml file (please see the attached file). Note that I have 2 persistence units in it : one for application data and other for jbpm. When I deploy this application to AS 7.1.0, (mvn clean package jboss-as:deploy), I get the following persistence exception :

 

=========================================================================================================================================

23:32:43,335 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (MSC service thread 1-2) HHH000397: Using ASTQueryTranslatorFactory

23:32:43,341 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.persistenceunit."jbpmDemo.war#org.jbpm.persistence.jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpmDemo.war#org.jbpm.persistence.jpa": Failed to start service

    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

    at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] class or package not found

    at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1401)

    at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:1184)

    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1048)

    at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:693)

    at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)

    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

    at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

    ... 3 more

Caused by: java.lang.ClassNotFoundException: org.jbpm.process.audit.ProcessInstanceLog from [Module "org.hibernate:main" from local module loader @23e5d1 (roots: /home/vimal/Apps/jboss-eap-6.0/modules)]

    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

    at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_31]

    at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_31]

    at org.hibernate.internal.util.ReflectHelper.classForName(ReflectHelper.java:170)

    at org.hibernate.ejb.Ejb3Configuration.classForName(Ejb3Configuration.java:1318)

    at org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1390)

    ... 11 more

===================================================================================================================================

 

Can somebody please help.

 

Thx

  • 1. Re: Having problems in configuring jBPM persistence on AS 7.1.0 Final
    Vimal Kansal Newbie

    And if I remove the ProcessInstanceLog etc entities from persistence.xml, I get the following exception :

     

    org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider

    00:37:24,288 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.persistenceunit."jbpmDemo.war#org.jbpm.persistence.jpa": org.jboss.msc.service.StartException in service jboss.persistenceunit."jbpmDemo.war#org.jbpm.persistence.jpa": Failed to start service

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_31]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_31]

        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_31]

    Caused by: javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:890)

        at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)

        at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-1.jar:1.0.2.GA-redhat-1]

        ... 3 more

    Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, at table: ProcessInstanceInfo, for columns: [org.hibernate.mapping.Column(eventTypes)]

        at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:305)

        at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:289)

        at org.hibernate.mapping.Property.isValid(Property.java:238)

        at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:468)

        at org.hibernate.mapping.RootClass.validate(RootClass.java:270)

        at org.hibernate.cfg.Configuration.validate(Configuration.java:1294)

        at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1736)

        at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:93)

        at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:905)

        ... 9 more

  • 2. Re: Having problems in configuring jBPM persistence on AS 7.1.0 Final
    Vimal Kansal Newbie

    Never mind got it working.

  • 3. Re: Having problems in configuring jBPM persistence on AS 7.1.0 Final
    Avneesh Sisodia Newbie

    Hi Vimal,

    I am also facing same problem when trying to create task service for jbpm human task .

    What you were did to get out from this exception.?