[jboss-user] [JBoss jBPM] - Re: JBPM-BPEL process monitoring - engine API

ruhl22 do-not-reply at jboss.com
Thu Oct 11 10:18:28 EDT 2007


Hi Alex.

I have implemented a session bean facade and deployed it to the jboss server, where the jbpm-bpel engine runs. Additionally, using a client application, I access the method exposed by the deployed session bean.

Everything runs as imagined, except that I get an exception (related to hibernate lazy collection initialization) when trying to access the Actions of a BpelProcess.


  | Clinent code:
  | Map<String, Action> actionMap = bpelProcessTemplate.getActions();
  | actionMap.size(); //exception flies here.

The exception stack is:

Exception in thread "main" org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.graph.def.ProcessDefinition.actions, no session or session was closed
  | 	at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
  | 	at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
  | 	at org.hibernate.collection.AbstractPersistentCollection.readSize(AbstractPersistentCollection.java:97)
  | 	at org.hibernate.collection.PersistentMap.size(PersistentMap.java:95)
  | 	at com.agetas.jbpm.client.Run.main(Run.java:83)


Do you have any idea, how I can prevent this exception to occur?  I don't want to modify the hibernate mapping code of the classes within jbpm-jpdl.jar, to deactivate lazy loading...

Thanks in advane, ruhl22.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4094109#4094109

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4094109



More information about the jboss-user mailing list