[jboss-user] [jBPM Users] - Ending task with timer - session is closed
Jimmy56
do-not-reply at jboss.com
Tue Sep 29 21:01:04 EDT 2009
Hi,
I'm using following configuration:
JBoss AS 4.3
jBPM 3.2.2
Seam 2.0.2
Hibernate 3.3.0
jBPM is configured to use JTA. JbpmContext is injected with Hibernate session took from Seam managed EntityManager.
When I end task, which has a timer, everything works fine but at the end of rendering phase exception is thrown:
| 02:50:26,345 ERROR [TaskMgmtSession] org.hibernate.SessionException: Session is closed!
| 02:50:26,438 ERROR [SeamPhaseListener] uncaught exception
| org.jbpm.JbpmException: couldn't get task instance '146'
| at org.jbpm.db.TaskMgmtSession.getTaskInstance(TaskMgmtSession.java:190)
| at org.jbpm.JbpmContext.getTaskInstanceForUpdate(JbpmContext.java:251)
| at org.jboss.seam.bpm.TaskInstance$1.work(TaskInstance.java:49)
| at org.jboss.seam.bpm.TaskInstance$1.work(TaskInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
| at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
| at org.jboss.seam.Component.unwrap(Component.java:2118)
| at org.jboss.seam.Component.getInstance(Component.java:1890)
| at org.jboss.seam.Component.getInstance(Component.java:1855)
| at org.jboss.seam.Component.getInstance(Component.java:1832)
| at org.jboss.seam.Component.getInstance(Component.java:1827)
| at org.jboss.seam.bpm.TaskInstance.instance(TaskInstance.java:64)
| at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:231)
| at org.jboss.seam.contexts.BusinessProcessContext.getNamesFromContext(BusinessProcessContext.java:109)
| at org.jboss.seam.contexts.BusinessProcessContext.getNames(BusinessProcessContext.java:97)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:241)
| at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:356)
| at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
| at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:513)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
| at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
| at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
| at org.jbpm.db.TaskMgmtSession.getTaskInstance(TaskMgmtSession.java:186)
| ... 68 more
| 02:50:26,438 ERROR [SeamPhaseListener] swallowing exception
| org.jbpm.JbpmException: couldn't get task instance '146'
| at org.jbpm.db.TaskMgmtSession.getTaskInstance(TaskMgmtSession.java:190)
| at org.jbpm.JbpmContext.getTaskInstanceForUpdate(JbpmContext.java:251)
| at org.jboss.seam.bpm.TaskInstance$1.work(TaskInstance.java:49)
| at org.jboss.seam.bpm.TaskInstance$1.work(TaskInstance.java:43)
| at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
| at org.jboss.seam.bpm.TaskInstance.getTaskInstance(TaskInstance.java:39)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
| at org.jboss.seam.Component.callComponentMethod(Component.java:2092)
| at org.jboss.seam.Component.unwrap(Component.java:2118)
| at org.jboss.seam.Component.getInstance(Component.java:1890)
| at org.jboss.seam.Component.getInstance(Component.java:1855)
| at org.jboss.seam.Component.getInstance(Component.java:1832)
| at org.jboss.seam.Component.getInstance(Component.java:1827)
| at org.jboss.seam.bpm.TaskInstance.instance(TaskInstance.java:64)
| at org.jboss.seam.contexts.BusinessProcessContext.getTaskInstance(BusinessProcessContext.java:231)
| at org.jboss.seam.contexts.BusinessProcessContext.getNamesFromContext(BusinessProcessContext.java:109)
| at org.jboss.seam.contexts.BusinessProcessContext.getNames(BusinessProcessContext.java:97)
| at org.jboss.seam.contexts.Contexts.destroy(Contexts.java:241)
| at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:356)
| at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:112)
| at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:513)
| at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
| at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:192)
| at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
| at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
| at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.hibernate.SessionException: Session is closed!
| at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:49)
| at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:874)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
| at org.jbpm.db.TaskMgmtSession.getTaskInstance(TaskMgmtSession.java:186)
| ... 68 more
|
I'm confused what is seam trying to do on destroying of context and where is TaskInstance, which it tries to retrieve, registered. Has it something to do with JobExecutor? Or any other suggestions?
Thank you.
regards,
Jakub
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4257770#4257770
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4257770
More information about the jboss-user
mailing list