<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    eternal exception : jBPM seam 'Session is closed!'
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/abdurrahman_nasr">Abdurrahman Nasr</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/537217#537217">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi guys..</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have an exception which occurs when seam container try to create Business Process from processdefinition.xml. using annotation like</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>==============================</p><p>@CreateProcess(definition = "todo_BP")</p><p>&#160;&#160;&#160; public String createTodo() {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("==========Proces created========");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return "success";<br/>&#160;&#160;&#160; }</p><p>==============================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I have digged for this exception days and nights <span> :-/ </span> and nobody answer it, neither the community.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>here is the exception</p><p>==================================================</p><pre class="jive-pre"><code class="jive-code jive-xml">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
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
&#160;&#160;&#160; at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
&#160;&#160;&#160; at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
&#160;&#160;&#160; at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
&#160;&#160;&#160; at org.jboss.seam.Component.unwrap(Component.java:2275)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2041)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2000)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1994)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1967)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1962)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
&#160;&#160;&#160; at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1982)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1977)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1957)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1952)
&#160;&#160;&#160; at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:493)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:148)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:118)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:214)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:96)
&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
&#160;&#160;&#160; at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
&#160;&#160;&#160; at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&#160;&#160;&#160; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.SessionException: Session is closed!
&#160;&#160;&#160; at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
&#160;&#160;&#160; ... 78 more
16:57:35,348 ERROR [SynchronizationRegistry] Exception processing transaction Synchronization before completion
org.hibernate.SessionException: Session is closed!
&#160;&#160;&#160; at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1020)
&#160;&#160;&#160; at org.jboss.seam.bpm.ManagedJbpmContext.beforeCompletion(ManagedJbpmContext.java:116)
&#160;&#160;&#160; at org.jboss.seam.transaction.SynchronizationRegistry.beforeTransactionCompletion(SynchronizationRegistry.java:62)
&#160;&#160;&#160; at org.jboss.seam.transaction.SeSynchronizations.beforeTransactionCommit(SeSynchronizations.java:49)
&#160;&#160;&#160; at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:49)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:613)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:604)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:345)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:245)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
&#160;&#160;&#160; at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
&#160;&#160;&#160; at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&#160;&#160;&#160; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&#160;&#160;&#160; 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&#160; [SeamPhaseListener] uncaught exception, passing to exception handler
org.jbpm.JbpmException: could not get process instance 30
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
&#160;&#160;&#160; at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
&#160;&#160;&#160; at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
&#160;&#160;&#160; at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
&#160;&#160;&#160; at org.jboss.seam.Component.unwrap(Component.java:2275)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2041)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2000)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1994)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1967)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1962)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
&#160;&#160;&#160; at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1982)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1977)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1957)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1952)
&#160;&#160;&#160; at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:506)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
&#160;&#160;&#160; at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
&#160;&#160;&#160; at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&#160;&#160;&#160; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.SessionException: Session is closed!
&#160;&#160;&#160; at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
&#160;&#160;&#160; ... 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
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:311)
&#160;&#160;&#160; at org.jbpm.JbpmContext.getProcessInstanceForUpdate(JbpmContext.java:378)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:49)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance$1.work(ProcessInstance.java:43)
&#160;&#160;&#160; at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.getProcessInstance(ProcessInstance.java:39)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Method.java:597)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
&#160;&#160;&#160; at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:144)
&#160;&#160;&#160; at org.jboss.seam.Component.callComponentMethod(Component.java:2249)
&#160;&#160;&#160; at org.jboss.seam.Component.unwrap(Component.java:2275)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2041)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:2000)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1994)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1967)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1962)
&#160;&#160;&#160; at org.jboss.seam.bpm.ProcessInstance.instance(ProcessInstance.java:65)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getProcessInstance(BusinessProcessContext.java:229)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.getContextInstance(BusinessProcessContext.java:217)
&#160;&#160;&#160; at org.jboss.seam.contexts.BusinessProcessContext.get(BusinessProcessContext.java:68)
&#160;&#160;&#160; at org.jboss.seam.contexts.Contexts.lookupInStatefulContexts(Contexts.java:209)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1982)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1977)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1957)
&#160;&#160;&#160; at org.jboss.seam.Component.getInstance(Component.java:1952)
&#160;&#160;&#160; at org.jboss.seam.persistence.PersistenceContexts.instance(PersistenceContexts.java:82)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:506)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:249)
&#160;&#160;&#160; at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
&#160;&#160;&#160; at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
&#160;&#160;&#160; at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
&#160;&#160;&#160; at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
&#160;&#160;&#160; at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
&#160;&#160;&#160; at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
&#160;&#160;&#160; at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
&#160;&#160;&#160; at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
&#160;&#160;&#160; at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
&#160;&#160;&#160; at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
&#160;&#160;&#160; at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
&#160;&#160;&#160; at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
&#160;&#160;&#160; at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
&#160;&#160;&#160; at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
&#160;&#160;&#160; at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
&#160;&#160;&#160; at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
&#160;&#160;&#160; at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
&#160;&#160;&#160; at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
&#160;&#160;&#160; at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
&#160;&#160;&#160; at java.lang.Thread.run(Thread.java:619)
Caused by: org.hibernate.SessionException: Session is closed!
&#160;&#160;&#160; at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:901)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:842)
&#160;&#160;&#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:835)
&#160;&#160;&#160; at org.jbpm.db.GraphSession.getProcessInstance(GraphSession.java:307)
&#160;&#160;&#160; ... 78 more
</code></pre><p>================================================================================================</p><p>/*process definition file*/</p><p>//todo.jpdl.xml</p><p>----------------------------------------------------------------------------------------------------------------------------------------</p><p>&lt;process-definition name="todo_BP"&gt;<br/>&#160;&#160;&#160; &lt;start-state name="start"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;transition to="todo" /&gt;<br/>&#160;&#160;&#160; &lt;/start-state&gt;<br/>&#160;&#160;&#160; &lt;task-node name="todo"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;task name="todo" description="This is a test"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;assignment actor-id="manager" /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/task&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;transition to="done" name="toend"/&gt;<br/>&#160;&#160;&#160; &lt;/task-node&gt;<br/>&#160;&#160;&#160; &lt;end-state name="done" &gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;event type="process-start"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;script name="s"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println(&amp;quot;Reached to the end&amp;quot;);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/script&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/event&gt;<br/>&#160;&#160;&#160; &lt;/end-state&gt;<br/>&lt;/process-definition&gt;</p><p>----------------------------------------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>/*Creator Bean*/</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>//TodoList.java</p><p>----------------------------------------------------------------------------------------------------------------------------------------</p><p>package net.anasr;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>import org.jboss.seam.annotations.Name;<br/>import org.jboss.seam.annotations.bpm.CreateProcess;<br/>import org.jboss.seam.annotations.bpm.EndTask;<br/>import org.jboss.seam.annotations.bpm.StartTask;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>@Name("todoList")<br/>public class TodoList {<br/>&#160;&#160;&#160; private String description;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public String getDescription() {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return (description==null?"No description associated with this element":description);<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; public void setDescription(String description) {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; this.description = description;<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; @CreateProcess(definition = "todo_BP")<br/>&#160;&#160;&#160; public String createTodo() {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("==========Proces created========");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return "success";<br/>&#160;&#160;&#160; }</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; @StartTask<br/>&#160;&#160;&#160; @EndTask<br/>&#160;&#160;&#160; public String done() {<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.out.println("==========Proces Done========");<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; return "done";<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160; }<br/>}</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>----------------------------------------------------------------------------------------------------------------------------------------</p><p>plz it's urgent matter, any one knows, plz tell</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank...!</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/537217#537217">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>