- Red Hat JBoss BPM Suite (BPMS) 6.0.x
SessionNotFoundException: No session found for context 1 is thrown by trying to complete an
User Task after a server restart, it uses
PerProcessInstanceRuntimeManager (Per Process Instance runtime strategy). Basically, it calls
startApprovalWorkflow() to start the process - this should stop at the user task and wait. After that, the server is restarted. Then it tries to complete the task and the error is thrown:
11:40:09,915 WARN [org.jbpm.services.task.persistence.TaskTransactionInterceptor] (http-localhost/127.0.0.1:8080-4) [//] Could not commit session: org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 1 at org.jbpm.runtime.manager.impl.PerProcessInstanceRuntimeManager.getRuntimeEngine(PerProcessInstanceRuntimeManager.java:102) [jbpm-runtime-manager-6.0.2-redhat-6.jar:6.0.2-redhat-6] at org.jbpm.services.task.wih.ExternalTaskEventListener.afterTaskCompletedEvent(ExternalTaskEventListener.java:115) [jbpm-human-task-workitems-6.0.2-redhat-6.jar:6.0.2-redhat-6] at org.jbpm.services.task.events.TaskEventSupport.fireAfterTaskCompleted(TaskEventSupport.java:189) [jbpm-human-task-core-6.0.2-redhat-6.jar:6.0.2-redhat-6] ...
**Note: ** It works if the server is not restarted or if set
SingletonRuntimeManager (Singleton runtime strategy).
This is a bug that has been fixed in BPM Suite 6.1.0.
Please refers to BZ-1195142 to obtain further details.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.