This error was just encountered when I first came into contact with jbpm:
Closed jbpmcontext in different order then they were created... check your try-finally's around jbpmcontexts Blocks
I was puzzled. I said on the Internet that the hibernate session was not closed, and I was searching for the javaeye session. The source code has the following statement:
If (jbpmcontext! = Popped ){
Throw new jbpmexception ("Closed jbpmcontext in different order then they were created... check your try-finally's around jbpmcontexts blocks ");
}
Because a filter is set
<Filter>
<Filter-Name> jbpmcontextfilter </filter-Name>
<Filter-class> org. jbpm. Web. jbpmcontextfilter </filter-class>
</Filter>
<Filter-mapping>
<Filter-Name> jbpmcontextfilter </filter-Name>
<URL-pattern>/* </url-pattern>
</Filter-mapping>
So I probably guessed that this filter will generate a jbpmcontext for each request, so it will be compared with the jbpmcontext object on your current JSP page and the jbpmcontext object that has passed the filter, if they are different, we will see this method.
Jbpmcontext = jbpmconfiguration. getinstance (). getcurrentjbpmcontext ();
I used the following:
Jbpmcontext = jbpmconfiguration. getinstance (). createjbpmcontext ();
So you know. It is similar to the session in hibernate. Find the answer!