6 Replies Latest reply on Jan 10, 2013 8:40 AM by jnorris

    abortProcessInstance causes an exception

    jnorris Newbie

      When the ksession.abortProcessInstance( pID ) is invoked a Hibernate exception is being thrown:

       

      Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206)

                at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParameters(TaskPersistenceManager.java:346)

                at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:295)

                ... 72 more

      Caused by: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99)

                at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)

                at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437)

                at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407)

                at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:201)

       

      This occurs with the jbpm-5.4.0/drools-5.5.0 runtime jars.

       

      Has anyone else run into this issue?

       

      Thanks,

      Jim

        • 1. Re: abortProcessInstance causes an exception
          Maciej Swiderski Master

          have never seen this before, could you describe how did you run into it? Do you use console and demo environment? And if you could upload complete stack trace that would be help

           

          Cheers

          • 2. Re: abortProcessInstance causes an exception
            jnorris Newbie

            Hi Maciej,

             

            We have a set of cxf web services that interface to the jbpm runtime.  We are not using any of the jbpm web apps and are running in an osgi container.  When the web services is invoked a setup method gets a bean that has the jbpm api calls.  A setup method creates the session.  When the method being called returns a cleanup method disposes of the session.   I would have attached a zip with the log and some code but I don't see any way to do that so I'll add it in the reply.  This is the spring configuration in blueprint.xml:

             

            <bean id="jtaTransactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">

                      <property name="transactionManager" ref="transactionManager"/>

                      <property name="userTransaction" ref="userTransaction"/>

            </bean>

             

            <bean id="htTxMgr" class="org.drools.container.spring.beans.persistence.HumanTaskSpringTransactionManager" scope="prototype">

                      <argument ref="jtaTransactionManager" />

            </bean>

             

            <bean id="systemEventListener" class="org.drools.SystemEventListenerFactory" factory-method="getSystemEventListener" />

             

            <bean id="taskService" class="org.jbpm.task.service.TaskService" scope="prototype">

                      <property name="systemEventListener" ref="systemEventListener" />

            </bean>

             

            <bean id="taskSessionFactory" class="org.jbpm.task.service.persistence.TaskSessionSpringFactoryImpl"

                      init-method="initialize" depends-on="taskService" scope="prototype">

                      <property name="transactionManager" ref="htTxMgr" />

                      <property name="useJTA" value="true" />

                      <property name="taskService" ref="taskService" />

                      <jpa:unit unitname="org.jbpm.persistence.jpa" property="entityManagerFactory"/>

            </bean>

             

            <bean id="provider.jbpm.api.interaction" class="com.test.jbpm.JbpmApiInteraction"

                      init-method="setup" scope="prototype">

                  <property name="transactionManager" ref="jtaTransactionManager" />

                      <property name="taskSessionFactory" ref="taskSessionFactory" />

                      <jpa:unit unitname="org.jbpm.persistence.jpa" property="entityManagerFactory"/>

            </bean>

             

            The setup method in the bean does the following:

             

            Environment env = KnowledgeBaseFactory.newEnvironment();

            env.set( EnvironmentName.ENTITY_MANAGER_FACTORY, this.entityManagerFactory );

            env.set( EnvironmentName.GLOBALS, new MapGlobalResolver() );

            AbstractPlatformTransactionManager aptm = (AbstractPlatformTransactionManager) transactionManager;

            TransactionManager transactionManager = new DroolsSpringTransactionManager( aptm );

            env.set( EnvironmentName.TRANSACTION_MANAGER, transactionManager );

            PersistenceContextManager persistenceContextManager = new DroolsSpringJpaManager( env );

            env.set( EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, persistenceContextManager );

            Properties properties = new Properties();

            properties.put( "drools.processInstanceManagerFactory", "org.jbpm.persistence.processinstance.JPAProcessInstanceManagerFactory" );

            properties.put( "drools.processSignalManagerFactory", "org.jbpm.persistence.processinstance.JPASignalManagerFactory" );

            KnowledgeSessionConfiguration config = KnowledgeBaseFactory.newKnowledgeSessionConfiguration( properties );

            ksession = JPAKnowledgeService.newStatefulKnowledgeSession( this.kbase, config, env );

            this.ksession.getWorkItemManager().registerWorkItemHandler( "Service Task", new ServiceTaskHandler() );

            this.taskSession = taskSessionFactory.createTaskServiceSession();

            taskService = this.taskSession.getService();

            localTaskService = new LocalTaskService( taskService );

            CustomSyncWsWorkItemHandler  humanTaskHandler = new CustomSyncWsWorkItemHandler( this.localTaskService, this.ksession );

            humanTaskHandler.setLocal( true );

            humanTaskHandler.connect();

            this.ksession.getWorkItemManager().registerWorkItemHandler( "Human Task", humanTaskHandler );

            this.ksession.addEventListener( new ProcessEventListenerImpl());

            TasksAdmin admin = taskService.createTaskAdmin();

            this.ksession.addEventListener( new TaskCleanUpProcessEventListener( admin ));

             

            Note: the CustomSyncWsWorkItemHandler is related to issue JBPM-3578.  We need this because we also are supporting BRMS5.3.0.

             

            The bean is created:

             

            jbpmApiInteraction = (JbpmApiInteraction)blueprintContainer.getComponentInstance( "provider.jbpm.api.interaction" );

             

            The method to cancel the process instance is invoked on the bean:

             

            jbpmApiInteraction.cancelProcessInstance( instanceId ) calls this.ksession.abortProcessInstance( instanceId )

             

            After the call returns the objects are disposed in the bean:

             

            this.taskSession.dispose();

            this.localTaskService.dispose();

            this.kession.dispose();

             

            I'll post the stack trace in another reply.

             

            Regards,

            Jim

            • 3. Re: abortProcessInstance causes an exception
              jnorris Newbie

              Here's the stack trace:

               

              14 Dec 2012 08:35:32,765 | ERROR | qtp20014045-141  | SingleSessionCommandService      | 298 - com.test.bpm.providers-jbpm - 1.0.0.SNAPSHOT | Could not commit session

              java.lang.RuntimeException: Operation failed

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:310)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:317)

                        at org.jbpm.task.admin.TasksAdminImpl.getCompletedTasksByProcessId(TasksAdminImpl.java:83)

                        at org.jbpm.task.admin.TaskCleanUpProcessEventListener.afterProcessCompleted(TaskCleanUpProcessEventListener.java:39)

                        at org.drools.event.ProcessEventSupport.fireAfterProcessCompleted(ProcessEventSupport.java:76)

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:262)

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:269)

                        at org.jbpm.process.instance.ProcessRuntimeImpl.abortProcessInstance(ProcessRuntimeImpl.java:371)

                        at org.drools.impl.StatefulKnowledgeSessionImpl.abortProcessInstance(StatefulKnowledgeSessionImpl.java:301)

                        at org.drools.command.runtime.process.AbortProcessInstanceCommand.execute(AbortProcessInstanceCommand.java:42)

                        at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)

                        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)

                        at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.abortProcessInstance(CommandBasedStatefulKnowledgeSession.java:131)

                        at com.test.bpm.bpm.provider.jbpm.JbpmApiInteraction.cancelProcessInstance(JbpmApiInteraction.java:533)

                        at com.test.bpm.bpm.provider.jbpm.BPMProviderImpl.cancelProcessInstance(BPMProviderImpl.java:192)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]

                        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]

                        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)

                        at org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)

                        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)

                        at $Proxy118.cancelProcessInstance(Unknown Source)

                        at com.test.bpm.bpm.BPMServiceImpl.cancelProcessInstance(BPMServiceImpl.java:515)[293:com.test.bpm.bpm-webservices:1.0.0.SNAPSHOT]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]

                        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]

                        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]

                        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]

                        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]

                        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:128)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[92:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)[78:org.eclipse.jetty.security:7.5.4.v20111024]

                        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.Server.handle(Server.java:349)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)[82:org.eclipse.jetty.http:7.5.4.v20111024]

                        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)[82:org.eclipse.jetty.http:7.5.4.v20111024]

                        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)[77:org.eclipse.jetty.io:7.5.4.v20111024]

                        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)[77:org.eclipse.jetty.io:7.5.4.v20111024]

                        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)[85:org.eclipse.jetty.util:7.5.4.v20111024]

                        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)[85:org.eclipse.jetty.util:7.5.4.v20111024]

                        at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

              Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                        at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParameters(TaskPersistenceManager.java:346)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:295)

                        ... 72 more

              Caused by: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                        at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99)

                        at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)

                        at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437)

                        at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407)

                        at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:201)

                        ... 74 more

              14 Dec 2012 08:35:32,781 | ERROR | qtp20014045-141  | JbpmApiInteraction               | 298 - com.test.bpm.providers-jbpm - 1.0.0.SNAPSHOT | JbpmApiInteraction.cancelProcessInstance() - Exception!

              java.lang.RuntimeException: Operation failed

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:310)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:317)

                        at org.jbpm.task.admin.TasksAdminImpl.getCompletedTasksByProcessId(TasksAdminImpl.java:83)

                        at org.jbpm.task.admin.TaskCleanUpProcessEventListener.afterProcessCompleted(TaskCleanUpProcessEventListener.java:39)

                        at org.drools.event.ProcessEventSupport.fireAfterProcessCompleted(ProcessEventSupport.java:76)

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:262)

                        at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.setState(WorkflowProcessInstanceImpl.java:269)

                        at org.jbpm.process.instance.ProcessRuntimeImpl.abortProcessInstance(ProcessRuntimeImpl.java:371)

                        at org.drools.impl.StatefulKnowledgeSessionImpl.abortProcessInstance(StatefulKnowledgeSessionImpl.java:301)

                        at org.drools.command.runtime.process.AbortProcessInstanceCommand.execute(AbortProcessInstanceCommand.java:42)

                        at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)

                        at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373)

                        at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.abortProcessInstance(CommandBasedStatefulKnowledgeSession.java:131)

                        at com.test.bpm.bpm.provider.jbpm.JbpmApiInteraction.cancelProcessInstance(JbpmApiInteraction.java:533)

                        at com.test.bpm.bpm.provider.jbpm.BPMProviderImpl.cancelProcessInstance(BPMProviderImpl.java:192)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]

                        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]

                        at org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java:50)

                        at org.apache.aries.proxy.impl.DefaultWrapper.invoke(DefaultWrapper.java:31)

                        at org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:78)

                        at $Proxy118.cancelProcessInstance(Unknown Source)

                        at com.test.bpm.bpm.BPMServiceImpl.cancelProcessInstance(BPMServiceImpl.java:515)[293:com.test.bpm.bpm-webservices:1.0.0.SNAPSHOT]

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.6.0_24]

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[:1.6.0_24]

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_24]

                        at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_24]

                        at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_24]

                        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_24]

                        at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_24]

                        at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:123)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:207)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:213)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:193)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:128)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:185)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:108)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)[92:org.apache.geronimo.specs.geronimo-servlet_2.5_spec:1.1.2]

                        at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:164)[167:org.apache.cxf.bundle:2.5.0.fuse-70-097]

                        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:547)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:480)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:483)[78:org.eclipse.jetty.security:7.5.4.v20111024]

                        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:941)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:117)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:409)[79:org.eclipse.jetty.servlet:7.5.4.v20111024]

                        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:875)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:72)[97:org.ops4j.pax.web.pax-web-jetty:1.0.10]

                        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.Server.handle(Server.java:349)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.java:936)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:801)[82:org.eclipse.jetty.http:7.5.4.v20111024]

                        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:224)[82:org.eclipse.jetty.http:7.5.4.v20111024]

                        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)[81:org.eclipse.jetty.server:7.5.4.v20111024]

                        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)[77:org.eclipse.jetty.io:7.5.4.v20111024]

                        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)[77:org.eclipse.jetty.io:7.5.4.v20111024]

                        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)[85:org.eclipse.jetty.util:7.5.4.v20111024]

                        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)[85:org.eclipse.jetty.util:7.5.4.v20111024]

                        at java.lang.Thread.run(Thread.java:662)[:1.6.0_24]

              Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                        at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:206)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParameters(TaskPersistenceManager.java:346)

                        at org.jbpm.task.service.persistence.TaskPersistenceManager.queryWithParametersInTransaction(TaskPersistenceManager.java:295)

                        ... 72 more

              Caused by: org.hibernate.QueryParameterException: could not locate named parameter [processInstanceId]

                        at org.hibernate.engine.query.ParameterMetadata.getNamedParameterDescriptor(ParameterMetadata.java:99)

                        at org.hibernate.engine.query.ParameterMetadata.getNamedParameterExpectedType(ParameterMetadata.java:105)

                        at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:437)

                        at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:407)

                        at org.hibernate.ejb.QueryImpl.setParameter(QueryImpl.java:201)

                        ... 74 more

              • 4. Re: abortProcessInstance causes an exception
                Maciej Swiderski Master

                looks like it is caused by task clean up listener

                this.ksession.addEventListener( new TaskCleanUpProcessEventListener( admin ));

                 

                most likely when it is not registered the problem will disappear. Anyway that's certainly a bug, could you please file an jira issue for this?

                 

                And that does not happen on successful completion of the process instance?

                 

                HTH

                • 5. Re: abortProcessInstance causes an exception
                  jnorris Newbie

                  Hi Maciej,

                   

                  Thanks for the info.  As requested I have created a Jira issue for this:  https://issues.jboss.org/browse/JBPM-3891

                   

                  Normal process instance completion does not cause any issues.

                   

                  Regards,

                  Jim

                  • 6. Re: abortProcessInstance causes an exception
                    jnorris Newbie

                    Hi Maciej,

                     

                    Your jira post fixed the issue.  For others, the problem was in the taskorm.xml file I was using which was a version supplied to me by redhat to fix a different query issue in a previous version.

                     

                    Regards,

                    Jim