2 Replies Latest reply on May 23, 2018 12:47 AM by Thanuj Igalawithana

    JBPM on wildfly

    Thanuj Igalawithana Newbie

      Hi All,

       

      We have a java project which uses jbpm to manage a process inside there. Currently we are in the process of upgrading our project from java 1.6 to java 1.8. We got an error while deploying our war file in the  wildfly-11.0.0.CR1 , here is the error that we got.

      ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 62) MSC000001: Failed to start service jboss.persistenceunit."WorkFlow.war#jbpm.unit01": org.jboss.msc.service.StartException in service jboss.persistenceunit."WorkFlow.war#jbpm.unit01": javax.persistence.PersistenceException: [PersistenceUnit: jbpm.unit01] Unable to build Hibernate SessionFactory

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:195)

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)

      at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

      at java.lang.Thread.run(Thread.java:748)

      at org.jboss.threads.JBossThread.run(JBossThread.java:320)

      Caused by: javax.persistence.PersistenceException: [PersistenceUnit: jbpm.unit01] Unable to build Hibernate SessionFactory

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:953)

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:883)

      at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)

      at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)

      ... 7 more

      Caused by: org.hibernate.HibernateException: Errors in named queries: GetProcessInstanceIdByCorrelation

      at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:501)

      at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:422)

      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:880)

      ... 9 more

      The JBPM version that we are using is 6.0.

      Is there any relationship with the JBPM version and wildfly ?

      Earlier with Java 1.6 it was working properly with the Jboss7 AS.

      Are there any configurations to do with Wildfly server ?

        • 1. Re: JBPM on wildfly
          Demian Calcaprina Master

          It seems that in 6.0 there was a bug for hibernate 4.3

          https://issues.jboss.org/browse/JBPM-4322

           

           

          Probably if you upgraded wildfly, you may be using a newer version of hibernate. If this is a problem, you should migrate at least to jbpm 6.1.0.Final

          • 2. Re: JBPM on wildfly
            Thanuj Igalawithana Newbie

            Thank you Damian.

            Yes I have upgraded the hibernate after moving to wildfly. I have upgraded  Jbpm to 6.1 and now I got a different issue. I'm working resolve that.

             

            Here is the error that I have.

             

             

             

            Error in named query: TasksAssignedAsBusinessAdministrator: org.hibernate.hql.internal.ast.QuerySyntaxException: org.jbpm.services.task.query.TaskImpl is not mapped [select distinct new org.jbpm.services.task.query.TaskSummaryImpl( t.id, t.name, t.subject, t.description, t.taskData.status, t.priority, t.taskData.actualOwner.id, t.taskData.createdBy.id, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processInstanceId, t.taskData.parentId, t.taskData.deploymentId, t.taskData.skipable ) from org.jbpm.services.task.query.TaskImpl t join t.peopleAssignments.businessAdministrators businessAdministrators where t.archived = 0 and businessAdministrators.id = :userId order by t.id DESC]

            at org.hibernate.hql.internal.ast.QuerySyntaxException.generateQueryException(QuerySyntaxException.java:79)

            at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:103)

            at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:218)

            at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)

            at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)

            at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:76)

            at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:150)

            at org.hibernate.internal.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:155)

            at org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:796)

            at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:492)

            at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:422)

            at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:880)

            at org.jboss.as.jpa.hibernate5.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)

            at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:167)

            at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:125)

            at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:640)

            at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:209)

            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

            at java.lang.Thread.run(Thread.java:748)

            at org.jboss.threads.JBossThread.run(JBossThread.java:320)

            Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: org.jbpm.services.task.query.TaskImpl is not mapped

            at org.hibernate.hql.internal.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:171)

            at org.hibernate.hql.internal.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:91)

            at org.hibernate.hql.internal.ast.tree.FromClause.addFromElement(FromClause.java:79)

            at org.hibernate.hql.internal.ast.HqlSqlWalker.createFromElement(HqlSqlWalker.java:324)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3690)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3579)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:718)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:574)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:311)

            at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:259)

            at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262)

            at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)

            ... 18 more

            calca  wrote:

             

            It seems that in 6.0 there was a bug for hibernate 4.3

            https://issues.jboss.org/browse/JBPM-4322

             

             

            Probably if you upgraded wildfly, you may be using a newer version of hibernate. If this is a problem, you should migrate at least to jbpm 6.1.0.Final