[JBoss jBPM] - Help with jbpm error
by francesco.franze
Hi all, I'm trying to retrieve the value of some variables added to a remote jbpm process, but when I request the ContextIstance it gaves this error
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, no session or session was closed
I tryed another way to catch the variables, with the following code
ProcessInstance processInstance1=this.prendiIstanzaWorkflow(workflowDT);
VariablesCommand variabile= new VariablesCommand();
token = processInstance1.getRootToken();
variabile.setTokenId(token.getId());
Object o=servizioWorkflowJbpm.execute(variabile);
TokenVariableMap tmv=(TokenVariableMap) o;
ContextInstance cc=tmv.getContextInstance();
Map map = cc.getVariables();
but the error is the same Can someone help me? Thanks.
There the full stack trace
ERROR [org.hibernate.LazyInitializationException] - failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, no session or session was closed
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.jbpm.context.exe.TokenVariableMap.variableInstances, 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.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentMap.entrySet(PersistentMap.java:206)
at org.jbpm.context.exe.VariableContainer.getVariablesLocally(VariableContainer.java:119)
at org.jbpm.context.exe.VariableContainer.getVariables(VariableContainer.java:106)
at org.jbpm.context.exe.ContextInstance.getVariables(ContextInstance.java:106)
at org.jbpm.context.exe.ContextInstance.getVariables(ContextInstance.java:95)
at com.linksmt.fpap.services.WorkflowJbpmService.prendiInfo(WorkflowJbpmService.java:109)
at com.linksmt.fpap.services.WorkflowJbpmService.infoStatoCorrente(WorkflowJbpmService.java:76)
at com.linksmt.fpap.controllers.TestWorkflowController.handleRequestInternal(TestWorkflowController.java:31)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:523)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:453)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193960#4193960
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193960
17 years, 4 months
[EJB/JBoss] - Log4j problem
by bharaneetharan
hi,
Iam using Jboss 4.0.2 App server and using EJB 2. I have written a simple EJB and used log 4j for debugging. I added log4j-1.2.11.jar in the build path. the log4j.xml is as follows
<log4j:configuration>
| <appender name="stdout" class="org.apache.log4j.DailyRollingFileAppender">
| <param name="File" value="c:/Log4jTestlog.log" />
| <param name="DatePattern" value="'.'yyyy-MM-dd" />
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="%d %p %t %c - %m%n"/>
| </layout>
| </appender>
| <root>
| <priority value="debug"></priority>
| <appender-ref ref="stdout"/>
| </root>
| </log4j:configuration>
whenever i run the ejb and made a call from a stand alone client, the application works very fine. but logging is not happening. even the file (Log4jTestlog.log) is not getting created. I dont know why.
But if i use the same log4j.xml for a console application it works very fine. whether any special configurations to be done for Jboss?
Please help me to solve this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4193954#4193954
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4193954
17 years, 4 months