[
http://jira.jboss.com/jira/browse/JBPM-681?page=comments#action_12418491 ]
Bernd Ruecker commented on JBPM-681:
------------------------------------
Damn, the "node.hbm.xml" was not changed (maybe forgotten by me?). So this is
still an issue in jbpm 3.2.3 with nodes... Solved in head.
GraphElement.raiseException results in Exception with Java EE
-------------------------------------------------------------
Key: JBPM-681
URL:
http://jira.jboss.com/jira/browse/JBPM-681
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.1.1
Environment: Java EE with JTA
Reporter: Bernd Ruecker
Assigned To: Tom Baeyens
Priority: Critical
Fix For: jBPM jPDL 3.2.2
If you
- invoke a SessionBean in a jbpm action
- jBPM and the SessionBean run in the same JTA transaction
- a Exception occurs
Then the Transaction is marked for rollback from the EJB-Container when the Exception
occurs in the SessionBean.
Now jBPM wants to handle the Exception (see
http://docs.jboss.com/jbpm/v3/userguide/processmodelling.html#exceptionha...):
When an exception occurs in a delegation class, the process element parent hierarchy is
serached for an appropriate exception-handler. When it is found, the actions of the
exception-handler are executed
But becaue the transaction is already marked for rollback, a call to Hibernate (lazy
loading?) results in a exception:
7:14:29,875 INFO [DefaultLoadEventListener] Error performing load command
org.hibernate.exception.GenericJDBCException: Cannot open connection
at
org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103
)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:420)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2821)
at
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.jav
a:370)
at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:351)
at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:122)
at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:81)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:871)
at org.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:829)
at
org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:66)
at
org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:160)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$cb896060.equals(<generated>)
at org.jbpm.util.EqualsUtil.equals(EqualsUtil.java:30)
at org.jbpm.graph.def.GraphElement.equals(GraphElement.java:418)
at
org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$78d101e.equals(<generated>)
at org.jbpm.graph.def.Transition.getParent(Transition.java:204)
at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:338)
at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:248)
at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:212)
at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:182)
at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:166)
at org.jbpm.graph.def.Transition.take(Transition.java:106)
at org.jbpm.graph.def.Node.leave(Node.java:382)
at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:198)
at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$cb896060.leave(<generated>)
at org.jbpm.graph.exe.Token.signal(Token.java:174)
at org.jbpm.graph.exe.Token.signal(Token.java:145)
at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$fae2cddc.signal(<generated>)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:420)
at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:359)
at
org.jbpm.taskmgmt.exe.TaskInstance$$FastClassByCGLIB$$cb2c21af.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:163)
at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$cbd8230f.end(<generated>)
at
com.camunda.toolkit.jbpm.service.AdminServicesImpl.endTask(AdminServicesImpl.java:1452)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira