0 Replies Latest reply on Apr 13, 2010 11:39 AM by Abdurrahman Nasr

    eternal exception : jBPM seam 'Session is closed!'

    Abdurrahman Nasr Newbie

      Hi guys..

       

      I have an exception which occurs when seam container try to create Business Process from processdefinition.xml. using annotation like

       

      ==============================

      @CreateProcess(definition = "todo_BP")

          public String createTodo() {
              System.out.println("==========Proces created========");
              return "success";
          }

      ==============================

       

      I have digged for this exception days and nights and nobody answer it, neither the community.

       

      here is the exception

      ==================================================

      16:57:35,332 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
      16:57:35,348 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
      16:57:35,348 ERROR [SeamPhaseListener] swallowing exception
      org.jbpm.JbpmException: could not get process instance 30
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
          at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
          at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
          at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.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:22)
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
          at org.jboss.seam.Component.unwrap(Component.java:2275)
          at org.jboss.seam.Component.getInstance(Component.java:2041)
          at org.jboss.seam.Component.getInstance(Component.java:2000)
          at org.jboss.seam.Component.getInstance(Component.java:1994)
          at org.jboss.seam.Component.getInstance(Component.java:1967)
          at org.jboss.seam.Component.getInstance(Component.java:1962)
          at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
          at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
          at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
          at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
          at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
          at org.jboss.seam.Component.getInstance(Component.java:1982)
          at org.jboss.seam.Component.getInstance(Component.java:1977)
          at org.jboss.seam.Component.getInstance(Component.java:1957)
          at org.jboss.seam.Component.getInstance(Component.java:1952)
          at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
          at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:493)
          at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148)
          at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
          at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
          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.IdentityFilter.doFilter(IdentityFilter.java:40)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          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:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          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:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          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:72)
          at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
          ... 78 more
      16:57:35,348 ERROR [SynchronizationRegistry] Exception processing transaction Synchronization before completion
      org.hibernate.SessionException: Session is closed!
          at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
          at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1020)
          at org.jboss.seam.bpm.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:116)
          at org.jboss.seam.transaction.SynchronizationRegistry.beforeTransactionCompletion(SynchronizationRegistry.java:62)
          at org.jboss.seam.transaction.SeSynchronizations.beforeTransactionCommit(SeSynchronizations.java:49)
          at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:49)
          at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
          at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:604)
          at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:345)
          at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
          at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
          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.IdentityFilter.doFilter(IdentityFilter.java:40)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          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:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          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:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Thread.java:619)
      16:57:35,348 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
      16:57:35,348 WARN  [SeamPhaseListener] uncaught exception, passing to exception handler
      org.jbpm.JbpmException: could not get process instance 30
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
          at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
          at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
          at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.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:22)
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
          at org.jboss.seam.Component.unwrap(Component.java:2275)
          at org.jboss.seam.Component.getInstance(Component.java:2041)
          at org.jboss.seam.Component.getInstance(Component.java:2000)
          at org.jboss.seam.Component.getInstance(Component.java:1994)
          at org.jboss.seam.Component.getInstance(Component.java:1967)
          at org.jboss.seam.Component.getInstance(Component.java:1962)
          at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
          at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
          at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
          at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
          at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
          at org.jboss.seam.Component.getInstance(Component.java:1982)
          at org.jboss.seam.Component.getInstance(Component.java:1977)
          at org.jboss.seam.Component.getInstance(Component.java:1957)
          at org.jboss.seam.Component.getInstance(Component.java:1952)
          at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
          at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:506)
          at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
          at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
          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.IdentityFilter.doFilter(IdentityFilter.java:40)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          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:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          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:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          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:72)
          at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
          ... 78 more
      16:57:35,348 ERROR [GraphSession] org.hibernate.SessionException: Session is closed!
      16:57:35,348 ERROR [SeamPhaseListener] swallowing exception
      org.jbpm.JbpmException: could not get process instance 30
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
          at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
          at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
          at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
          at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.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:22)
          at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
          at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
          at org.jboss.seam.Component.unwrap(Component.java:2275)
          at org.jboss.seam.Component.getInstance(Component.java:2041)
          at org.jboss.seam.Component.getInstance(Component.java:2000)
          at org.jboss.seam.Component.getInstance(Component.java:1994)
          at org.jboss.seam.Component.getInstance(Component.java:1967)
          at org.jboss.seam.Component.getInstance(Component.java:1962)
          at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
          at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
          at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
          at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
          at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
          at org.jboss.seam.Component.getInstance(Component.java:1982)
          at org.jboss.seam.Component.getInstance(Component.java:1977)
          at org.jboss.seam.Component.getInstance(Component.java:1957)
          at org.jboss.seam.Component.getInstance(Component.java:1952)
          at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
          at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:506)
          at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
          at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
          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.IdentityFilter.doFilter(IdentityFilter.java:40)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          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:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
          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:235)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
          at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
          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:72)
          at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
          at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
          at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
          ... 78 more
      

      ================================================================================================

      /*process definition file*/

      //todo.jpdl.xml

      ----------------------------------------------------------------------------------------------------------------------------------------

      <process-definition name="todo_BP">
          <start-state name="start">
              <transition to="todo" />
          </start-state>
          <task-node name="todo">
              <task name="todo" description="This is a test">
                  <assignment actor-id="manager" />
              </task>
              <transition to="done" name="toend"/>
          </task-node>
          <end-state name="done" >
              <event type="process-start">
                  <script name="s">
                      System.out.println(&quot;Reached to the end&quot;);
                  </script>
              </event>
          </end-state>
      </process-definition>

      ----------------------------------------------------------------------------------------------------------------------------------------

       

      /*Creator Bean*/

       

      //TodoList.java

      ----------------------------------------------------------------------------------------------------------------------------------------

      package net.anasr;

       

      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.bpm.CreateProcess;
      import org.jboss.seam.annotations.bpm.EndTask;
      import org.jboss.seam.annotations.bpm.StartTask;

       

      @Name("todoList")
      public class TodoList {
          private String description;

       

          public String getDescription() {
              return (description==null?"No description associated with this element":description);
          }

       

          public void setDescription(String description) {
              this.description = description;
          }

       

          @CreateProcess(definition = "todo_BP")
          public String createTodo() {
              System.out.println("==========Proces created========");
              return "success";
          }

       

          @StartTask
          @EndTask
          public String done() {
              System.out.println("==========Proces Done========");
              return "done";
             
          }
      }

       

       

      ----------------------------------------------------------------------------------------------------------------------------------------

      plz it's urgent matter, any one knows, plz tell

       

      Thank...!