1 2 Previous Next 19 Replies Latest reply on Jun 1, 2014 3:52 AM by Dmitry Losev

    Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?

    Bryan Shaw Newbie

      The spring integration seems have a lot of change in the with the new kie api introduced.

      Does anybody tried to configure a spring jbpm integration project with:

      • local task service
      • successfully combines the transactions of business application with the jbpm jpa transactions with local transaction manager
      • feature like drools agent from previous version to pull definition from guvnor

      If does, may I have a example of that, because there is little documentation of spring integration with JBPM 6 there.

        • 1. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
          Maciej Swiderski Master

          I am currently working on on improving spring integration and as soon as I have it ready I'll post some examples. Currently (6.0.0) spring works well with jta transaction manager. But there are issues when using shared entity manager or resource local. Thus this on going improvements.

           

          HTH

          • 2. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
            Bryan Shaw Newbie

            Nice to know currently spring work well with jta transaction manager. Can you give me a simple but fully covered example to help me understand how to embed a JBPM 6 engine in an Spring application? Because I can't find any example code. Currently the document doesn't make any sense to me.  With a dramatically changed api, only some fragment of bean definition just doesn't work for me .

            • 5. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
              sandy yang Newbie

              i try deploy customer jbpm6 web app to jboss 7 ,but get exception as follow:

               

              11:54:06,072 INFO  [org.jboss.solder.exception.control.extension] (MSC service thread 1-9) Adding handler Qualifiers: [@javax.enterprise.inject.Any()] TraversalMode: BREADTH_FIRST Handles Type: class java.lang.Throwable Precedence: -100 [method] public org.jboss.seam.transaction.SimpleTransactionExceptionHandler.markTransactionRollback(CaughtException<Throwable>) to known handlers

              11:54:06,287 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-9) MSC000001: Failed to start service jboss.deployment.unit."MDWF.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."MDWF.war".WeldStartService: Failed to start service

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

                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_40]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_40]

                at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_40]

              Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 3 exceptions:

              Exception 0 :

              org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.audit.AuditJMSProcessor.entityManagerFactory]

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:312)

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)

                at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:144)

                at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)

                at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:383)

                at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:368)

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

                at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

              Exception 0 :

              org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [EntityManagerFactory] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.AbstractDeploymentService.emf]

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:312)

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)

                at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:144)

                at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)

                at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:383)

                at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:368)

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

                at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

              Exception 0 :

              org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [DeploymentService] with qualifiers [@Default] at injection point [[field] @Inject private org.jbpm.kie.services.impl.form.FormProviderServiceImpl.deploymentService]

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:312)

                at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)

                at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:144)

                at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164)

                at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:383)

                at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:368)

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

                at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

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

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

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

               

               

                at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:395)

                at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:368)

                at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:379)

                at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:64)

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

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

                ... 3 more

              • 6. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                Bryan Shaw Newbie

                In your example the spring configuration contains a jbpmEMF and transaction manager configuration. And you use API approach to create a RuntimeEnvironment of JBPM6.

                That works fine.

                And now we try to do the same in our web application. And we want to use the JBPM 6 in a spring application without using CDI.

                We configured the entity manager factory and jta transaction as you did in the example and we create a spring bean to initialize the RuntimeEnvironment by setting the transaction manager, the entity manager factory, the user group callback by API. We think this can work.

                But when we deploy the application to JBoss Application Server, the error occurred like in the post above.

                The Jboss complains about CDI problems and the application fails to start.

                 

                So the question will be how to use JBPM 6 in a none CDI pure spring environment on the JBoss server? Why is JBoss complains about CDI dependency problem when we are not using CDI?

                • 7. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                  Maciej Swiderski Master

                  Bryan, cdi interfering with non cdi apps is known problem and we are working on this. Meanwhile you can try to disable weld subsystem for your application by defining it in jboss-deployment.xml, take a look here for more details.

                   

                  HTH

                  • 8. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                    Bryan Shaw Newbie

                    Yeah, we have done that and those weld error is gone for now.

                    But now we still have problem like database operations and transaction configurations using platform transaction manager.

                    JBPM JPA seems have error using SQL Server. The creation of SessionInfo throws a constraint violation exception because of null id field which seems to be expected to use the sequence table to get an id. Still working on it and hope to find the cause. We are using hibernate 4 and the SQLServer2008Dialect.

                    Too many problems...too limited resource to get a fully configured spring web application example on how to embed JBPM 6 into it.

                     

                    We want to upgrade to JBPM 6 only because the JBPM 5.4 seems to have some critical bugs to deal with the process execution with embedded sub-process and events. See JBPM 5.4 process execution problem

                    And the process diagram generation code can't deal with the embedded sub-process well. And the "inclusive gateway doesn't support converging direction" problem which seems still exists in 6.0 final.

                    I seriously expected those problem can be fixed in the 5.4 version instead of being forced to upgrade to JBPM 6.

                    Sigh...

                    • 9. Re: Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                      goutham rao Newbie

                      Hi,

                       

                      I have disabled the weld subsytem , but now I different errors . I'm building a spring mvc + ejb 3 + JPA2 app with JBPM embedded in it ( running JBOSS AS 7.1 ). My spring beans file uses a set up as mentioned in the example you attached previously. Below is my jboss-deployment-structure.xml

                       

                      <jboss-deployment-structure>
                         <deployment>
                            <exclusions>
                               <module name="javax.persistence.api" />
                       <module name="javaee.api" />
                       <module name="org.javassist" />
                       <module name="org.jboss.interceptor" />
                       <module name="org.jboss.as.weld" />
                       <module name="org.jboss.logging" />
                       <module name="org.jboss.weld.core" />
                       <module name="org.jboss.weld.api" />
                       <module name="org.jboss.weld.spi" />
                            </exclusions>
                         </deployment>
                      </jboss-deployment-structure>
                      
                      

                       

                      Below is my error stack trace

                      Failed to process phase POST_MODULE of deployment "sample-spring-jbpm.war"
                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [classes.jar:1.6.0_65]
                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [classes.jar:1.6.0_65]
                        at java.lang.Thread.run(Thread.java:695) [classes.jar:1.6.0_65]
                      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS016053: Service class org.drools.compiler.cdi.KieCDIExtension didn't implement the javax.enterprise.inject.spi.Extension interface
                        at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:119)
                        at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadAttachments(WeldPortableExtensionProcessor.java:100)
                        at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.deploy(WeldPortableExtensionProcessor.java:86)
                        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
                        ... 5 more
                      Caused by: java.lang.ClassCastException: org.drools.compiler.cdi.KieCDIExtension cannot be cast to javax.enterprise.inject.spi.Extension
                        at org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor.loadExtension(WeldPortableExtensionProcessor.java:117)
                        ... 8 more
                      
                      
                      
                      • 10. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                        Maciej Swiderski Master

                        Bryan Shaw wrote:

                         

                        Yeah, we have done that and those weld error is gone for now.

                        But now we still have problem like database operations and transaction configurations using platform transaction manager.

                        JBPM JPA seems have error using SQL Server. The creation of SessionInfo throws a constraint violation exception because of null id field which seems to be expected to use the sequence table to get an id. Still working on it and hope to find the cause. We are using hibernate 4 and the SQLServer2008Dialect.

                        Too many problems...too limited resource to get a fully configured spring web application example on how to embed JBPM 6 into it.

                         

                        take a look at some spring improvements in 6.1.0 that might help you easer embed jbpm 6 in spring application.

                         

                        HTH

                        • 11. Re: Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                          unrest yang Newbie

                          Hi Maciej Swiderski !

                          Would you do me a favor. Now i'm working on integrating spring-4.0.2.RELEASE、hibernate-4.3.4.Final and jBPM-6.0.1.Final. I use tomcat7 as my web server. Consult the jBPM documention and some other material, i almost finish the work. But when i start tomcat, the problem comes.Here the information:


                          SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

                          org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/home/yanggengxiang/Applications/apache-tomcat-7.0.42/webapps/sjhweb/WEB-INF/classes/applicationContext-tx.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: GetProcessInstanceIdByCorrelation

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                            at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)

                            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)

                            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                            at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

                            at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                            at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

                            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

                            at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

                            at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

                            at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

                            at java.util.concurrent.FutureTask.run(FutureTask.java:262)

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

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

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

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

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

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

                            at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)

                            at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)

                            at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)

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

                            at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)

                            at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)

                            at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                            ... 21 more

                           

                           

                          And i attach my whole project.Would you take a break from your work and give this some time.

                          Thank you!!!

                           

                          Apologize for my poor english.

                          • 12. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                            Maciej Swiderski Master

                            isn't there any root cause of why the query is invalid according to hibernate?

                             

                            P.S.

                            You're using version that jBPM was not tested on - hibernate 4.2 is used by jBPM at the moment.

                             

                            HTH

                            • 13. Re: Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                              unrest yang Newbie

                              1、Here is the content of META-INF/JBPMorm.xml

                               

                              <?xml version="1.0" encoding="UTF-8"?>

                              <entity-mappings

                                version="2.0"

                                xmlns="http://java.sun.com/xml/ns/persistence/orm"

                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                                xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_2_0.xsd">

                                 

                                    <named-query name="ProcessInstancesWaitingForEvent">

                                        <query>

                              select

                                  processInstanceInfo.processInstanceId

                              from

                                  ProcessInstanceInfo processInstanceInfo join processInstanceInfo.eventTypes eventTypes

                              where

                                  eventTypes = :type

                                        </query>

                                    </named-query>

                                   

                                   <named-query name="GetProcessInstanceIdByCorrelation">

                                        <query>

                              select

                                  key.processInstanceId

                              from

                                  CorrelationKeyInfo key left join key.properties props

                              where

                                  size(key.properties) = cast(:elem_count as integer) and

                                  props.value in :properties

                                  group by key.id,key.processInstanceId

                              having count(key.id) = :elem_count

                                        </query>

                                    </named-query>

                                     <named-query name="GetCorrelationKeysByProcessInstanceId">

                                        <query>    

                              select

                                  key

                              from

                                  CorrelationKeyInfo key

                              where

                                  key.processInstanceId = :pId

                                    </query>

                                    </named-query>

                              </entity-mappings>

                               

                               

                              2、Here may be the root cause :

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.internal.NamedQueryRepository.checkNamedQueries(159) | Checking named query: GetProcessInstanceIdByCorrelation

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(294) | parse() - HQL: select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportWarning(89) | Keyword  'properties' is being interpreted as an identifier due to: expecting IDENT, found 'properties'

                              [QC] ERROR [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportError(78) | line 1:133: unexpected token: key

                              [QC] ERROR [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportError(73) | line 1:133: unexpected token: key

                              line 1:133: unexpected token: key

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.atom(HqlBaseParser.java:3716)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3376)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3248)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2954)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:590)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2721)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2582)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2546)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2462)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2427)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.expression(HqlBaseParser.java:2137)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.exprList(HqlBaseParser.java:4040)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.identPrimary(HqlBaseParser.java:4206)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.primaryExpression(HqlBaseParser.java:882)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.atom(HqlBaseParser.java:3604)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.unaryExpression(HqlBaseParser.java:3376)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.multiplyExpression(HqlBaseParser.java:3248)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.additiveExpression(HqlBaseParser.java:2954)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.concatenation(HqlBaseParser.java:590)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.relationalExpression(HqlBaseParser.java:2721)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.equalityExpression(HqlBaseParser.java:2582)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.negatedExpression(HqlBaseParser.java:2546)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalAndExpression(HqlBaseParser.java:2462)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalOrExpression(HqlBaseParser.java:2427)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.expression(HqlBaseParser.java:2137)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.logicalExpression(HqlBaseParser.java:1913)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.whereClause(HqlBaseParser.java:474)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.queryRule(HqlBaseParser.java:729)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.selectStatement(HqlBaseParser.java:316)

                                at org.hibernate.hql.internal.antlr.HqlBaseParser.statement(HqlBaseParser.java:179)

                                at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:295)

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

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

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

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

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

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

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

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

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

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)

                                at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)

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

                                at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)

                                at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)

                                at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)

                                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)

                                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

                                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

                                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

                                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

                                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

                                at java.util.concurrent.FutureTask.run(FutureTask.java:262)

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

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

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

                              [QC] WARN [localhost-startStop-1] org.hibernate.hql.internal.ast.HqlParser.processEqualityExpression(316) | HHH000203: processEqualityExpression() : No expression to process!

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.reportWarning(89) | Keyword  'properties' is being interpreted as an identifier due to: expecting IDENT, found 'properties'

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.showHqlAst(312) | --- HQL AST ---

                              \-[QUERY] Node: 'query'

                                  +-[SELECT_FROM] Node: 'SELECT_FROM'

                                  |  +-[FROM] Node: 'from'

                                  |  |  +-[RANGE] Node: 'RANGE'

                                  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  |  |  +-[IDENT] Node: 'org'

                                  |  |  |  |  |  |  |  \-[IDENT] Node: 'jbpm'

                                  |  |  |  |  |  |  \-[IDENT] Node: 'persistence'

                                  |  |  |  |  |  \-[IDENT] Node: 'correlation'

                                  |  |  |  |  \-[IDENT] Node: 'CorrelationKeyInfo'

                                  |  |  |  \-[ALIAS] Node: 'key'

                                  |  |  \-[JOIN] Node: 'join'

                                  |  |     +-[LEFT] Node: 'left'

                                  |  |     +-[DOT] Node: '.'

                                  |  |     |  +-[IDENT] Node: 'key'

                                  |  |     |  \-[WEIRD_IDENT] Node: 'properties'

                                  |  |     \-[ALIAS] Node: 'props'

                                  |  \-[SELECT] Node: 'select'

                                  |     \-[DOT] Node: '.'

                                  |        +-[IDENT] Node: 'key'

                                  |        \-[IDENT] Node: 'processInstanceId'

                                  +-[WHERE] Node: 'where'

                                  |  \-[AND] Node: 'and'

                                  |     +-[EQ] Node: '='

                                  |     |  +-[METHOD_CALL] Node: '('

                                  |     |  |  +-[IDENT] Node: 'size'

                                  |     |  |  \-[EXPR_LIST] Node: 'exprList'

                                  |     |  \-[METHOD_CALL] Node: '('

                                  |     |     +-[IDENT] Node: 'cast'

                                  |     |     \-[EXPR_LIST] Node: 'exprList'

                                  |     |        +-[COLON] Node: ':'

                                  |     |        |  \-[IDENT] Node: 'elem_count'

                                  |     |        \-[IDENT] Node: 'integer'

                                  |     \-[IN] Node: 'in'

                                  |        +-[DOT] Node: '.'

                                  |        |  +-[IDENT] Node: 'props'

                                  |        |  \-[IDENT] Node: 'value'

                                  |        \-[IN_LIST] Node: 'inList'

                                  |           \-[COLON] Node: ':'

                                  |              \-[WEIRD_IDENT] Node: 'properties'

                                  \-[GROUP] Node: 'group'

                                     +-[DOT] Node: '.'

                                     |  +-[IDENT] Node: 'key'

                                     |  \-[IDENT] Node: 'id'

                                     +-[DOT] Node: '.'

                                     |  +-[IDENT] Node: 'key'

                                     |  \-[IDENT] Node: 'processInstanceId'

                                     \-[HAVING] Node: 'having'

                                        \-[EQ] Node: '='

                                           +-[COUNT] Node: 'count'

                                           |  \-[DOT] Node: '.'

                                           |     +-[IDENT] Node: 'key'

                                           |     \-[IDENT] Node: 'id'

                                           \-[COLON] Node: ':'

                                              \-[IDENT] Node: 'elem_count'

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.internal.NamedQueryRepository.checkNamedQueries(159) | Checking named query: GetCorrelationKeysByProcessInstanceId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(294) | parse() - HQL: select key from org.jbpm.persistence.correlation.CorrelationKeyInfo key where key.processInstanceId = :pId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.showHqlAst(312) | --- HQL AST ---

                              \-[QUERY] Node: 'query'

                                  +-[SELECT_FROM] Node: 'SELECT_FROM'

                                  |  +-[FROM] Node: 'from'

                                  |  |  \-[RANGE] Node: 'RANGE'

                                  |  |     +-[DOT] Node: '.'

                                  |  |     |  +-[DOT] Node: '.'

                                  |  |     |  |  +-[DOT] Node: '.'

                                  |  |     |  |  |  +-[DOT] Node: '.'

                                  |  |     |  |  |  |  +-[IDENT] Node: 'org'

                                  |  |     |  |  |  |  \-[IDENT] Node: 'jbpm'

                                  |  |     |  |  |  \-[IDENT] Node: 'persistence'

                                  |  |     |  |  \-[IDENT] Node: 'correlation'

                                  |  |     |  \-[IDENT] Node: 'CorrelationKeyInfo'

                                  |  |     \-[ALIAS] Node: 'key'

                                  |  \-[SELECT] Node: 'select'

                                  |     \-[IDENT] Node: 'key'

                                  \-[WHERE] Node: 'where'

                                     \-[EQ] Node: '='

                                        +-[DOT] Node: '.'

                                        |  +-[IDENT] Node: 'key'

                                        |  \-[IDENT] Node: 'processInstanceId'

                                        \-[COLON] Node: ':'

                                           \-[IDENT] Node: 'pId'

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.beforeStatement(121) | select << begin [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromElement.doInitialize(158) | FromClause{level=1} : org.jbpm.persistence.correlation.CorrelationKeyInfo (key) -> correlatio0_

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : key -> correlatio0_.keyId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : key -> correlatio0_.keyId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.DotNode.getDataType(653) | getDataType() : processInstanceId -> org.hibernate.type.LongType@3e063650

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : key.processInstanceId -> correlatio0_.processInstanceId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.beforeStatementCompletion(125) | select : finishing up [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.HqlSqlWalker.processQuery(664) | processQuery() :  ( SELECT ( {select clause} correlatio0_.keyId ) ( FromClause{level=1} CorrelationKeyInfo correlatio0_ ) ( where ( = ( correlatio0_.processInstanceId correlatio0_.keyId processInstanceId ) ? ) ) )

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.util.JoinProcessor.addJoinNodes(187) | Using FROM fragment [CorrelationKeyInfo correlatio0_]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.afterStatementCompletion(129) | select >> end [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(281) | --- SQL AST ---

                              \-[SELECT] QueryNode: 'SELECT'  querySpaces (CorrelationKeyInfo)

                                  +-[SELECT_CLAUSE] SelectClause: '{select clause}'

                                  |  +-[ALIAS_REF] IdentNode: 'correlatio0_.keyId as keyId1_1_' {alias=key, className=org.jbpm.persistence.correlation.CorrelationKeyInfo, tableAlias=correlatio0_}

                                  |  \-[SQL_TOKEN] SqlFragment: 'correlatio0_.name as name2_1_, correlatio0_.processInstanceId as processI3_1_, correlatio0_.OPTLOCK as OPTLOCK4_1_'

                                  +-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[key], fromElementByTableAlias=[correlatio0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}

                                  |  \-[FROM_FRAGMENT] FromElement: 'CorrelationKeyInfo correlatio0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=key,role=null,tableName=CorrelationKeyInfo,tableAlias=correlatio0_,origin=null,columns={,className=org.jbpm.persistence.correlation.CorrelationKeyInfo}}

                                  \-[WHERE] SqlNode: 'where'

                                     \-[EQ] BinaryLogicOperatorNode: '='

                                        +-[DOT] DotNode: 'correlatio0_.processInstanceId' {propertyName=processInstanceId,dereferenceType=PRIMITIVE,getPropertyPath=processInstanceId,path=key.processInstanceId,tableAlias=correlatio0_,className=org.jbpm.persistence.correlation.CorrelationKeyInfo,classAlias=key}

                                        |  +-[ALIAS_REF] IdentNode: 'correlatio0_.keyId' {alias=key, className=org.jbpm.persistence.correlation.CorrelationKeyInfo, tableAlias=correlatio0_}

                                        |  \-[IDENT] IdentNode: 'processInstanceId' {originalText=processInstanceId}

                                        \-[NAMED_PARAM] ParameterNode: '?' {name=pId, expectedType=org.hibernate.type.LongType@3e063650}

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(263) | HQL: select key from org.jbpm.persistence.correlation.CorrelationKeyInfo key where key.processInstanceId = :pId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(264) | SQL: select correlatio0_.keyId as keyId1_1_, correlatio0_.name as name2_1_, correlatio0_.processInstanceId as processI3_1_, correlatio0_.OPTLOCK as OPTLOCK4_1_ from CorrelationKeyInfo correlatio0_ where correlatio0_.processInstanceId=?

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.internal.NamedQueryRepository.checkNamedQueries(159) | Checking named query: ProcessInstancesWaitingForEvent

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(294) | parse() - HQL: select processInstanceInfo.processInstanceId from org.jbpm.persistence.processinstance.ProcessInstanceInfo processInstanceInfo join processInstanceInfo.eventTypes eventTypes where eventTypes = :type

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.showHqlAst(312) | --- HQL AST ---

                              \-[QUERY] Node: 'query'

                                  +-[SELECT_FROM] Node: 'SELECT_FROM'

                                  |  +-[FROM] Node: 'from'

                                  |  |  +-[RANGE] Node: 'RANGE'

                                  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  |  +-[DOT] Node: '.'

                                  |  |  |  |  |  |  |  +-[IDENT] Node: 'org'

                                  |  |  |  |  |  |  |  \-[IDENT] Node: 'jbpm'

                                  |  |  |  |  |  |  \-[IDENT] Node: 'persistence'

                                  |  |  |  |  |  \-[IDENT] Node: 'processinstance'

                                  |  |  |  |  \-[IDENT] Node: 'ProcessInstanceInfo'

                                  |  |  |  \-[ALIAS] Node: 'processInstanceInfo'

                                  |  |  \-[JOIN] Node: 'join'

                                  |  |     +-[DOT] Node: '.'

                                  |  |     |  +-[IDENT] Node: 'processInstanceInfo'

                                  |  |     |  \-[IDENT] Node: 'eventTypes'

                                  |  |     \-[ALIAS] Node: 'eventTypes'

                                  |  \-[SELECT] Node: 'select'

                                  |     \-[DOT] Node: '.'

                                  |        +-[IDENT] Node: 'processInstanceInfo'

                                  |        \-[IDENT] Node: 'processInstanceId'

                                  \-[WHERE] Node: 'where'

                                     \-[EQ] Node: '='

                                        +-[IDENT] Node: 'eventTypes'

                                        \-[COLON] Node: ':'

                                           \-[IDENT] Node: 'type'

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.beforeStatement(121) | select << begin [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromElement.doInitialize(158) | FromClause{level=1} : org.jbpm.persistence.processinstance.ProcessInstanceInfo (processInstanceInfo) -> processins0_

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : processInstanceInfo -> processins0_.InstanceId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.DotNode.getDataType(653) | getDataType() : eventTypes -> org.hibernate.type.SetType(org.jbpm.persistence.processinstance.ProcessInstanceInfo.eventTypes)

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromElement.doInitialize(158) | FromClause{level=1} : null (eventTypes) -> eventtypes1_

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromClause.addCollectionJoinFromElementByPath(371) | addCollectionJoinFromElementByPath() : processInstanceInfo.eventTypes -> EventTypes

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.DotNode.dereferenceCollection(341) | dereferenceCollection() : Created new FROM element for processInstanceInfo.eventTypes : EventTypes eventtypes1_

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : processInstanceInfo.eventTypes -> .

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.HqlSqlWalker.createFromJoinElement(418) | createFromJoinElement() : -- join tree --

                              \-[JOIN_FRAGMENT] FromElement: 'EventTypes eventtypes1_' FromElement{explicit,collection join,not a fetch join,fetch non-lazy properties,classAlias=eventTypes,role=org.jbpm.persistence.processinstance.ProcessInstanceInfo.eventTypes,tableName={none},tableAlias=eventtypes1_,origin=null,columns={,className=null}}

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : processInstanceInfo -> processins0_.InstanceId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.DotNode.getDataType(653) | getDataType() : processInstanceId -> org.hibernate.type.LongType@3e063650

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : processInstanceInfo.processInstanceId -> processins0_.InstanceId

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.tree.FromReferenceNode.setResolved(77) | Resolved : eventTypes -> eventtypes1_.element

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.beforeStatementCompletion(125) | select : finishing up [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.HqlSqlWalker.processQuery(664) | processQuery() :  ( SELECT ( {select clause} ( processins0_.InstanceId processins0_.InstanceId processInstanceId ) ) ( FromClause{level=1} (  EventTypes eventtypes1_ ) ) ( where ( = eventtypes1_.element ? ) ) )

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.util.JoinProcessor.addJoinNodes(187) | Using FROM fragment [ProcessInstanceInfo processins0_]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.util.JoinProcessor.addJoinNodes(187) | Using FROM fragment [inner join EventTypes eventtypes1_ on processins0_.InstanceId=eventtypes1_.InstanceId]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.afterStatementCompletion(129) | select >> end [level=1, statement=select]

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(281) | --- SQL AST ---

                              \-[SELECT] QueryNode: 'SELECT'  querySpaces (ProcessInstanceInfo,EventTypes)

                                  +-[SELECT_CLAUSE] SelectClause: '{select clause}'

                                  |  +-[DOT] DotNode: 'processins0_.InstanceId' {propertyName=processInstanceId,dereferenceType=PRIMITIVE,getPropertyPath=processInstanceId,path=processInstanceInfo.processInstanceId,tableAlias=processins0_,className=org.jbpm.persistence.processinstance.ProcessInstanceInfo,classAlias=processInstanceInfo}

                                  |  |  +-[ALIAS_REF] IdentNode: 'processins0_.InstanceId' {alias=processInstanceInfo, className=org.jbpm.persistence.processinstance.ProcessInstanceInfo, tableAlias=processins0_}

                                  |  |  \-[IDENT] IdentNode: 'processInstanceId' {originalText=processInstanceId}

                                  |  \-[SELECT_COLUMNS] SqlNode: ' as col_0_0_'

                                  +-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=2, fromElementByClassAlias=[processInstanceInfo, eventTypes], fromElementByTableAlias=[processins0_, eventtypes1_], fromElementsByPath=[], collectionJoinFromElementsByPath=[processInstanceInfo.eventTypes], impliedElements=[]}

                                  |  \-[FROM_FRAGMENT] FromElement: 'ProcessInstanceInfo processins0_' FromElement{explicit,collection join,not a fetch join,fetch non-lazy properties,classAlias=processInstanceInfo,role=null,tableName=ProcessInstanceInfo,tableAlias=processins0_,origin=null,columns={,className=org.jbpm.persistence.processinstance.ProcessInstanceInfo}}

                                  |     \-[JOIN_FRAGMENT] FromElement: 'inner join EventTypes eventtypes1_ on processins0_.InstanceId=eventtypes1_.InstanceId' FromElement{explicit,collection join,not a fetch join,fetch non-lazy properties,classAlias=eventTypes,role=org.jbpm.persistence.processinstance.ProcessInstanceInfo.eventTypes,tableName={none},tableAlias=eventtypes1_,origin=ProcessInstanceInfo processins0_,columns={,className=null}}

                                  \-[WHERE] SqlNode: 'where'

                                     \-[EQ] BinaryLogicOperatorNode: '='

                                        +-[ALIAS_REF] IdentNode: 'eventtypes1_.element' {alias=eventTypes, className=null, tableAlias=eventtypes1_}

                                        \-[NAMED_PARAM] ParameterNode: '?' {name=type, expectedType=org.hibernate.type.StringType@6930ae6a}

                               

                               

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(263) | HQL: select processInstanceInfo.processInstanceId from org.jbpm.persistence.processinstance.ProcessInstanceInfo processInstanceInfo join processInstanceInfo.eventTypes eventTypes where eventTypes = :type

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.QueryTranslatorImpl.generate(264) | SQL: select processins0_.InstanceId as col_0_0_ from ProcessInstanceInfo processins0_ inner join EventTypes eventtypes1_ on processins0_.InstanceId=eventtypes1_.InstanceId where eventtypes1_.element=?

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(113) | throwQueryException() : no errors

                              [QC] DEBUG [localhost-startStop-1] org.hibernate.internal.NamedQueryRepository.checkNamedQueries(171) | Checking 0 named SQL queries

                              [QC] ERROR [localhost-startStop-1] org.hibernate.internal.SessionFactoryImpl.<init>(541) | HHH000177: Error in named query: GetProcessInstanceIdByCorrelation

                              org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: key near line 1, column 133 [select key.processInstanceId from org.jbpm.persistence.correlation.CorrelationKeyInfo key left join key.properties props where size(key.properties) = cast(:elem_count as integer) and props.value in :properties group by key.id,key.processInstanceId having count(key.id) = :elem_count]

                                at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:91)

                                at org.hibernate.hql.internal.ast.ErrorCounter.throwQueryException(ErrorCounter.java:109)

                                at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:304)

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

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

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

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

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

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

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

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

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

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)

                                at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)

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

                                at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)

                                at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)

                                at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)

                                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)

                                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

                                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

                                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

                                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

                                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

                                at java.util.concurrent.FutureTask.run(FutureTask.java:262)

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

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

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

                              [QC] DEBUG [localhost-startStop-1] org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(474) | Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@717d2d0a: defining beans [mvcContentNegotiationManager,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping#0,org.springframework.format.support.FormattingConversionServiceFactoryBean#0,org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter#0,mvcUriComponentsContributor,org.springframework.web.servlet.handler.MappedInterceptor#0,org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver#0,org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver#0,org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver#0,org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping,org.springframework.web.servlet.mvc.HttpRequestHandlerAdapter,org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter,userDAO,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.support.PropertySourcesPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,userService,ksession,kbase,jbpm_module,kiePostProcessor,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,serviceMethods,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,org.springframework.context.annotation.ConfigurationClassPostProcessor.enhancedConfigurationProcessor]; root of factory hierarchy

                              [QC] ERROR [localhost-startStop-1] org.springframework.web.context.ContextLoader.initWebApplicationContext(331) | Context initialization failed

                              org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/home/yanggengxiang/Applications/apache-tomcat-7.0.42/webapps/sjhweb/WEB-INF/classes/applicationContext-tx.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: GetProcessInstanceIdByCorrelation

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)

                                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)

                                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

                                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

                                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

                                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

                                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

                                at java.util.concurrent.FutureTask.run(FutureTask.java:262)

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

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

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

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

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

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

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)

                                at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)

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

                                at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)

                                at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)

                                at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                                ... 21 more

                              Mar 31, 2014 1:30:21 PM org.apache.catalina.core.StandardContext listenerStart

                              SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener

                              org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [/home/yanggengxiang/Applications/apache-tomcat-7.0.42/webapps/sjhweb/WEB-INF/classes/applicationContext-tx.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: Errors in named queries: GetProcessInstanceIdByCorrelation

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)

                                at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)

                                at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)

                                at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)

                                at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:973)

                                at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:750)

                                at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)

                                at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

                                at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

                                at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

                                at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)

                                at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)

                                at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)

                                at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)

                                at java.util.concurrent.FutureTask.run(FutureTask.java:262)

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

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

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

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

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

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

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)

                                at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)

                                at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)

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

                                at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)

                                at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:336)

                                at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1612)

                                at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1549)

                                ... 21 more

                               

                               

                              Based on this information, I guess the named-query "GetProcessInstanceIdByCorrelation" isn't valid in hibernate 4.2. I will try to switch the hibernate's version.

                               

                              Thanks a lot for your help !

                              • 14. Re: Anybody have an example of how to embed the JBPM 6 Engine in a Spring application?
                                unrest yang Newbie

                                I have changed hibernate4.3.4 to 4.2.0.SP1 and jbpm6.0.1 to 6.1.0.Beta1. Everything works well now.

                                 

                                1 2 Previous Next