[jboss-user] [jBPM Users] - couldn't get task instances list for actor pooledTaskInstanc

andrzejurban do-not-reply at jboss.com
Thu Aug 27 05:21:17 EDT 2009


Hello,

I have a problem regarding use of a pooledTaskInstanceList on my agenda. I'm using jBPM 3.2.2.GA and JBoss 4.2.2.GA server.

I create a new process instance using an annotated method:


@End
  | @CreateProcess(definition = "KNFExport", processKey = "#{exportId}")
  | public String saveExport() {


Then I access my agenda :


<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml"
  | xmlns:s="http://jboss.com/products/seam/taglib"
  | xmlns:ui="http://java.sun.com/jsf/facelets"
  | xmlns:f="http://java.sun.com/jsf/core"
  | xmlns:h="http://java.sun.com/jsf/html"
  | xmlns:a="http://richfaces.org/a4j" template="/layout/template.xhtml"
  | xmlns:rich="http://richfaces.org/rich">
  | <ui:define name="titlebar">#{messages['agenda.list']}</ui:define>
  | <ui:define name="body">
  | <rich:panel>
  | <f:facet name="header">#{messages['agenda.ownTasks']}</f:facet>
  | <h:form id="list">
  | <h:outputText
  | value="#{messages['agenda.noOwnTasks']}"
  | rendered="#{empty taskInstanceList}" /> <h:dataTable
  | value="#{taskInstanceList}" var="task"
  | rendered="#{not empty taskInstanceList}">
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.desc']}" />
  | </f:facet>
  | <h:inputText value="#{task.description}" readonly="true"/>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.name']}" />
  | </f:facet>
  | <h:inputText value="#{task.name}" readonly="true"/>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['id']}" />
  | </f:facet>
  | <h:inputText value="#{task.id}" />
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.created']}" />
  | </f:facet>
  | <h:inputText
  | value="#{task.taskMgmtInstance.processInstance.start}">
  | <f:convertDateTime type="date" />
  | </h:inputText>
  | </h:column>
  | </h:dataTable>
  | 
  | </h:form>
  | </rich:panel>
  | 
  | <rich:panel>
  | <f:facet name="header">#{messages['agenda.groupTasks']}</f:facet>
  | <h:form>
  | <h:outputText
  | value="#{messages['agenda.noGroupTasks']}"
  | rendered="#{empty pooledTaskInstanceList}" /><h:dataTable
  | value="#{pooledTaskInstanceList}" var="task"
  | rendered="#{not empty pooledTaskInstanceList}">
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.desc']}" />
  | </f:facet>
  | <h:inputText value="#{task.description}" readonly="true"/>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.name']}" />
  | </f:facet>
  | <h:inputText value="#{task.name}" readonly="true"/>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['id']}" />
  | </f:facet>
  | <h:inputText value="#{task.id}" readonly="true"/>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | <h:outputText value="#{messages['agenda.created']}" />
  | </f:facet>
  | <h:outputText
  | value="#{task.taskMgmtInstance.processInstance.start}">
  | <f:convertDateTime type="date" readonly="true"/>
  | </h:outputText>
  | </h:column>
  | <h:column>
  | <f:facet name="header">
  | </f:facet>
  | <s:button action="#{pooledTask.assignToCurrentActor}"
  | taskInstance="#{task}" value="#{messages['agenda.assignToMe']}">
  | <a:support event="onclick" reRender="taskList" />
  | </s:button>
  | </h:column>
  | </h:dataTable>
  | 
  | </h:form>
  | </rich:panel>
  | </ui:define>
  | </ui:composition>



On my agenda I can see a newly created task on a group task list.
When I use the 'assign to me' button,
instead of a rendered page I get an error:

"couldn't get task instances list for actor 'admin'"

The stack trace:



org.jbpm.JbpmException: couldn't get task instances list for actor 'admin'
  | at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:67)
  | at org.jbpm.JbpmContext.getTaskList(JbpmContext.java:191)
  | at org.jboss.seam.bpm.TaskInstanceList.getTaskInstanceList(TaskInstanceList.java:40)
  | at org.jboss.seam.bpm.TaskInstanceList.getTaskInstanceList(TaskInstanceList.java:33)
  | at sun.reflect.GeneratedMethodAccessor579.invoke(Unknown Source)
  | 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.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
  | at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
  | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:51)
  | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:95)
  | at org.jboss.seam.util.Work.workInTransaction(Work.java:47)
  | at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:89)
  | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
  | at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
  | at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
  | at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
  | at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
  | at org.jboss.seam.bpm.TaskInstanceList_$$_javassist_7.getTaskInstanceList(TaskInstanceList_$$_javassist_7.java)
  | at sun.reflect.GeneratedMethodAccessor578.invoke(Unknown Source)
  | 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:2211)
  | at org.jboss.seam.Component.unwrap(Component.java:2237)
  | at org.jboss.seam.Component.getInstance(Component.java:2004)
  | at org.jboss.seam.Component.getInstance(Component.java:1950)
  | at org.jboss.seam.Component.getInstance(Component.java:1944)
  | at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:55)
  | at org.jboss.seam.Namespace.getComponentInstance(Namespace.java:50)
  | at org.jboss.seam.el.SeamELResolver.resolveBase(SeamELResolver.java:177)
  | at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:53)
  | at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
  | at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
  | at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
  | at org.jboss.el.parser.AstEmpty.getValue(AstEmpty.java:29)
  | at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
  | at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
  | at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:370)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:880)
  | at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
  | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  | at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
  | at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
  | at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:220)
  | at org.richfaces.renderkit.html.PanelRenderer.doEncodeChildren(PanelRenderer.java:215)
  | at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
  | at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
  | at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
  | at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
  | at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
  | at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  | 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:390)
  | at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
  | 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:58)
  | 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:230)
  | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
  | at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 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:157)
  | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  | at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  | at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  | 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.getNamedQuery(SessionImpl.java:1258)
  | at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:61)
  | ... 103 more


When I restart the JBoss server with cleaning all the data,tmp,work folders, then it works fine. I see a task on my personal list(the task was transferred from one list to another despite the exception).
But if I click the 'Assing to me' button, I get the same exception as before.
The same situation is when I have more tasks on both lists and when transfering a task from group task list to my task list.

One time or two I got this exception as a cause instead of "Session is closed"

Caused by: java.lang.ClassCastException: org.jbpm.taskmgmt.exe.TaskInstance cannot be cast to java.lang.Long
  | 	at org.jbpm.db.TaskMgmtSession.findPooledTaskInstances(TaskMgmtSession.java:137)

I'm only using a built-in pooledTaskInstanceList and taskInstanceList components and I don't get why the ClassCastException...

Can anyone tell me what could be the cause?
I've searched the forum but couldn't find anything useful.

I can provide any additional info to help you solve this.

Regards,

Andrzej Urban 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252006#4252006

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4252006



More information about the jboss-user mailing list