JBoss Community

failed to lazily initialize a collection of role: org.jbpm.pvm.internal.model.ExecutionImpl.variables, no session or session was closed

created by Felix Jose in jBPM - View the full discussion

Hi All,

 

I am using JBPM with Spring and Hibernate. I am getting the following exception while getting the variables using executionImpl and is as follows:

 

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.pvm.internal.model.ExecutionImpl.variables, no session or session was closed
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
org.hibernate.collection.PersistentMap.entrySet(PersistentMap.java:242)
org.jbpm.pvm.internal.model.ScopeInstanceImpl.getVariables(ScopeInstanceImpl.java:237)
com.jpmc.speadd.service.impl.SpeaddWorkFlow.StartWorkFlow(SpeaddWorkFlow.java:245)

 

My JBPM-config file snippet:

 

 

 

 

<command-service name="txRequiredCommandService"> 

<retry-interceptor /> 

<environment-interceptor />

<spring-transaction-interceptor />

</command-service>

 

 

 

<

 

transaction-context>

 

 

<transaction type="spring"/>

 

 

<repository-session/>

 

 

<db-session/>

 

 

<message-session/>

 

 

<timer-session/>

 

 

<history-sessions>

 

 

<object class="org.jbpm.pvm.internal.history.HistorySessionImpl"/>

 

 

</history-sessions>

 

 

 

<!--

Need to set explicitly that we don't want jbpm to create sessions

-->

 

 

<hibernate-session current="true" close="false"/>

 

 

</transaction-context>

 

 

 

Can you please let me know how can i solve the same? Please send a response as soon as possible.

 

With Regards,

Felix K Jose

 

 

 

 

 

 

 

 

 

Reply to this message by going to Community

Start a new discussion in jBPM at Community