1 Reply Latest reply on Apr 17, 2012 1:59 AM by yan liu

    process instance query cannot work in Mysql6.0 JBPM4.4 sometimes

    yan liu Newbie

      Dear everyone,

       

      My platform is: JPBM4.4 + Mysql6.0.

       

      When I use the following statements the first time to query all the process instances which belongs to a process definition, it can work.

       

      List<ProcessInstance> processInstances = executionService //

                    .createProcessInstanceQuery() //

                    .processDefinitionId(processDefinitionId) //

                    .notSuspended()

                    .list();

       

      But when I use it the second time in very short time, it pops up the stacktraces something like ObjectNotFoundException?

      Have you encountered this problem before? How could you solve it?

       

      Thanks in advance!

       

       

       

       

       

      Hibernate:

          select

              deployment1_.OBJNAME_ as col_0_0_,

              deployment1_.DEPLOYMENT_ as col_1_0_

          from

              JBPM4_DEPLOYMENT deployment0_,

              JBPM4_DEPLOYPROP deployment1_,

              JBPM4_DEPLOYPROP deployment2_,

              JBPM4_DEPLOYPROP deployment3_

          where

              deployment1_.KEY_='pdid'

              and deployment1_.DEPLOYMENT_=deployment0_.DBID_

              and deployment2_.KEY_='pdkey'

              and deployment2_.OBJNAME_=deployment1_.OBJNAME_

              and deployment2_.DEPLOYMENT_=deployment0_.DBID_

              and deployment3_.KEY_='pdversion'

              and deployment3_.OBJNAME_=deployment1_.OBJNAME_

              and deployment3_.DEPLOYMENT_=deployment0_.DBID_

              and deployment1_.DEPLOYMENT_=220001

      Hibernate:

          select

              executioni0_.DBID_ as DBID1_3_,

              executioni0_.DBVERSION_ as DBVERSION3_3_,

              executioni0_.ACTIVITYNAME_ as ACTIVITY4_3_,

              executioni0_.PROCDEFID_ as PROCDEFID5_3_,

              executioni0_.HASVARS_ as HASVARS6_3_,

              executioni0_.NAME_ as NAME7_3_,

              executioni0_.KEY_ as KEY8_3_,

              executioni0_.ID_ as ID9_3_,

              executioni0_.STATE_ as STATE10_3_,

              executioni0_.SUSPHISTSTATE_ as SUSPHIS11_3_,

              executioni0_.PRIORITY_ as PRIORITY12_3_,

              executioni0_.HISACTINST_ as HISACTINST13_3_,

              executioni0_.PARENT_ as PARENT14_3_,

              executioni0_.INSTANCE_ as INSTANCE15_3_,

              executioni0_.SUPEREXEC_ as SUPEREXEC16_3_,

              executioni0_.SUBPROCINST_ as SUBPROC17_3_

          from

              JBPM4_EXECUTION executioni0_

          where

              (

                  executioni0_.PARENT_ is null

              )

              and executioni0_.STATE_<>'suspended'

              and executioni0_.PROCDEFID_='LeaveKey-12'

      Hibernate:

          select

              executioni0_.DBID_ as DBID1_3_0_,

              executioni0_.DBVERSION_ as DBVERSION3_3_0_,

              executioni0_.ACTIVITYNAME_ as ACTIVITY4_3_0_,

              executioni0_.PROCDEFID_ as PROCDEFID5_3_0_,

              executioni0_.HASVARS_ as HASVARS6_3_0_,

              executioni0_.NAME_ as NAME7_3_0_,

              executioni0_.KEY_ as KEY8_3_0_,

              executioni0_.ID_ as ID9_3_0_,

              executioni0_.STATE_ as STATE10_3_0_,

              executioni0_.SUSPHISTSTATE_ as SUSPHIS11_3_0_,

              executioni0_.PRIORITY_ as PRIORITY12_3_0_,

              executioni0_.HISACTINST_ as HISACTINST13_3_0_,

              executioni0_.PARENT_ as PARENT14_3_0_,

              executioni0_.INSTANCE_ as INSTANCE15_3_0_,

              executioni0_.SUPEREXEC_ as SUPEREXEC16_3_0_,

              executioni0_.SUBPROCINST_ as SUBPROC17_3_0_

          from

              JBPM4_EXECUTION executioni0_

          where

              executioni0_.DBID_=?

      2012-4-17 13:45:17 org.hibernate.event.def.DefaultLoadEventListener onLoad

      信息: Error performing load command

      org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.jbpm.pvm.internal.model.ExecutionImpl#0]

          at org.hibernate.impl.SessionFactoryImpl$2.handleEntityNotFound(SessionFactoryImpl.java:409)

          at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:171)

          at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:223)

          at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:126)

          at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:905)

          at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:873)

          at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:590)

          at org.hibernate.type.EntityType.resolve(EntityType.java:412)

          at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:139)

          at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:877)

          at org.hibernate.loader.Loader.doQuery(Loader.java:752)

          at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)

          at org.hibernate.loader.Loader.doList(Loader.java:2228)

          at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)

          at org.hibernate.loader.Loader.list(Loader.java:2120)

          at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)

          at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)

          at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)

          at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)

          at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)

          at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:93)

          at org.jbpm.pvm.internal.query.AbstractQuery.execute(AbstractQuery.java:83)

          at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

          at org.jbpm.pvm.internal.tx.SpringCommandCallback.doInTransaction(SpringCommandCallback.java:45)

          at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)

          at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:49)

          at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

          at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:40)

          at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:56)

          at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:64)

          at org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl.list(ProcessInstanceQueryImpl.java:49)

          at com.asiainfo.biframe.process.util.JBPMUtil.isReferredByProcessIntance(JBPMUtil.java:273)

          at com.asiainfo.biframe.process.util.JBPMUtil.suspendDeployment(JBPMUtil.java:249)

          at com.asiainfo.biframe.process.service.impl.JBPMServiceImpl.suspendDeployment(JBPMServiceImpl.java:155)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)

          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)

          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

          at $Proxy3.suspendDeployment(Unknown Source)

          at com.asiainfo.biframe.process.action.manage.ProcessManageAction.suspend(ProcessManageAction.java:215)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)

          at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)

          at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)

          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)

          at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)

          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)

          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)

          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)

          at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)

          at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)

          at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)

          at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)

          at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

          at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)

          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

          at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)

          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

          at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)

          at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)

          at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

          at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)

          at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

          at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

          at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

          at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

          at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

          at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

          at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

          at org.mortbay.jetty.Server.handle(Server.java:326)

          at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

          at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)

          at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)

          at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)

          at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

          at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)

          at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

        • 1. Re: process instance query cannot work in Mysql6.0 JBPM4.4 sometimes
          yan liu Newbie

          Complete statements are like:

           

          ProcessDefinition processDefinition = repositoryService //

                          .createProcessDefinitionQuery() //

                          .deploymentId(deploymentId) //

                          .uniqueResult(); //


          String processDefinitionId = processDefinition.getId();

           

          List<ProcessInstance> processInstances = executionService //

                         .createProcessInstanceQuery() //

                         .processDefinitionId(processDefinitionId) //

                         .notSuspended()

                         .list();