Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-4358

PerProcessInstanceRuntimeManager creation fails at startup

XMLWordPrintable

      I have created a web project based on jBPM 6.1.0-SNAPSHOT codes from github. While creating perprocessinstanceruntimemanager at startup I see the below error. I am using MySql db.

      Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bigint)=processins1_.InstanceId and contextmap0_.OWNER_ID='default-per-pinstance' at line 1

      The stack trace is
      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not extract ResultSet
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387)
      at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310)
      at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:273)
      at org.jbpm.runtime.manager.impl.mapper.JPAMapper.findKSessionToInit(JPAMapper.java:205)
      at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.init(PerProcessInstanceRuntimeManager.java:299)
      at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:104)
      at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl.java:95)
      at org.jbpm.runtime.manager.impl.RuntimeManagerFactoryImpl$Proxy$$$_WeldClientProxy.newPerProcessInstanceRuntimeManager(RuntimeManagerFactoryImpl$Proxy$$$_WeldClientProxy.java)
      at org.jbpm.runtime.manager.impl.cdi.RuntimeManagerProducer.newPerProcessInstanceRuntimeManager(RuntimeManagerProducer.java:84)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_51]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_51]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_51]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_51]
      at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
      at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
      at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
      at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:263)

      The error is coming from this new NamedQuery in org.jbpm.runtime.manager.impl.jpa.ContextMappingInfo.java

      @NamedQuery(name="FindKSessionToInit",
      query="select cmInfo.ksessionId from ContextMappingInfo cmInfo, "
      + "ProcessInstanceInfo processInstanceInfo join processInstanceInfo.eventTypes eventTypes"
      + " where eventTypes = 'timer' and cast(cmInfo.contextId as long) = processInstanceInfo.processInstanceId"
      + " and cmInfo.ownerId = :ownerId")})

      Casting of contextId to long is failing in MySql.

              swiderski.maciej Maciej Swiderski (Inactive)
              anindyas79 Anindya Saha (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: