Hi,
There is some inconsistence in the way you handle exception state.
I move a request to an admin close state which ended the token. The sending of the email to the user has failed and the request was marked as in a exception state. In the UI The request still exist and was showing state of exception but trying to move it to any other state Caused a java.lang.IllegalStateException: couldn't signal token : token has ended
Simon
Stack trace:
rg.apache.tapestry.BindingException: Exception invoking listener method save of component admin/EditTransactionState: Failure invoking listener method 'public void org.iana.rzm.web.pages.admin.EditTransactionState.save()' on $EditTransactionState_46@d3116[admin/EditTransactionState]: couldn't signal token : token has ended [Annotation @org.apache.tapestry.annotations.Component(inheritInformalParameters=false, bindings=[action=listener:save], id=save, type=LinkSubmit) of public abstract org.apache.tapestry.IComponent org.iana.rzm.web.pages.admin.EditTransactionState.getSubmitComponent()]
at org.apache.tapestry.binding.ListenerMethodBinding.actionTriggered(ListenerMethodBinding.java:89)
at org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:51)
at $ListenerInvoker_119e3c6bc95.invokeListener($ListenerInvoker_119e3c6bc95.java)
at org.apache.tapestry.form.AbstractSubmit$1.run(AbstractSubmit.java:88)
at org.apache.tapestry.form.FormSupportImpl.runDeferredRunnables(FormSupportImpl.java:608)
at org.apache.tapestry.form.FormSupportImpl.rewind(FormSupportImpl.java:589)
at org.apache.tapestry.form.Form.renderComponent(Form.java:226)
at org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
at org.apache.tapestry.form.Form.rewind(Form.java:327)
at org.apache.tapestry.engine.RequestCycle.rewindForm(RequestCycle.java:439)
at org.apache.tapestry.form.Form.trigger(Form.java:338)
at org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:146)
at org.apache.tapestry.engine.DirectService.service(DirectService.java:132)
at $IEngineService_119e3c6bcf2.service($IEngineService_119e3c6bcf2.java)
at org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
at org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
at $WebRequestServicer_119e3c6bccd.service($WebRequestServicer_119e3c6bccd.java)
at org.iana.rzm.web.tapestry.filter.TokenizedRequestFilter.service(TokenizedRequestFilter.java:45)
at $WebRequestServicerFilter_119e3c6bccb.service($WebRequestServicerFilter_119e3c6bccb.java)
at $WebRequestServicer_119e3c6bccf.service($WebRequestServicer_119e3c6bccf.java)
at org.iana.rzm.web.tapestry.DiscardSessionFilter.service(DiscardSessionFilter.java:24)
at $WebRequestServicerFilter_119e3c6bcc9.service($WebRequestServicerFilter_119e3c6bcc9.java)
at $WebRequestServicer_119e3c6bccf.service($WebRequestServicer_119e3c6bccf.java)
at $WebRequestServicer_119e3c6bcc5.service($WebRequestServicer_119e3c6bcc5.java)
at org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.java:56)
at $ServletRequestServicer_119e3c6bcab.service($ServletRequestServicer_119e3c6bcab.java)
at org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
at $ServletRequestServicerFilter_119e3c6bca7.service($ServletRequestServicerFilter_119e3c6bca7.java)
at $ServletRequestServicer_119e3c6bcad.service($ServletRequestServicer_119e3c6bcad.java)
at org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
at $ServletRequestServicerFilter_119e3c6bca5.service($ServletRequestServicerFilter_119e3c6bca5.java)
at $ServletRequestServicer_119e3c6bcad.service($ServletRequestServicer_119e3c6bcad.java)
at org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
at $ServletRequestServicerFilter_119e3c6bca9.service($ServletRequestServicerFilter_119e3c6bca9.java)
at $ServletRequestServicer_119e3c6bcad.service($ServletRequestServicer_119e3c6bcad.java)
at $ServletRequestServicer_119e3c6bc9f.service($ServletRequestServicer_119e3c6bc9f.java)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
at org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:525)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Failure invoking listener method 'public void org.iana.rzm.web.pages.admin.EditTransactionState.save()' on $EditTransactionState_46@d3116[admin/EditTransactionState]: couldn't signal token : token has ended [context:/admin/EditTransactionState.html]
at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:164)
at org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:124)
at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:65)
at org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:51)
at org.apache.tapestry.binding.ListenerMethodBinding.actionTriggered(ListenerMethodBinding.java:77)
... 57 more
Caused by: java.lang.IllegalStateException: couldn't signal token : token has ended
at org.jbpm.graph.exe.ProcessInstance.signal(ProcessInstance.java:227)
at org.iana.rzm.trans.dao.JbpmProcessDAO.signal(JbpmProcessDAO.java:336)
at sun.reflect.GeneratedMethodAccessor301.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
at $Proxy35.signal(Unknown Source)
at org.iana.rzm.trans.Transaction.transitTo(Transaction.java:250)
at org.iana.rzm.facade.admin.trans.GuardedAdminTransactionServiceBean.transitTransactionToState(GuardedAdminTransactionServiceBean.java:82)
at org.iana.rzm.facade.admin.trans.GuardedAdminTransactionServiceBean.transitTransactionToState(GuardedAdminTransactionServiceBean.java:75)
at sun.reflect.GeneratedMethodAccessor611.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
at org.iana.rzm.facade.common.HibernateExceptionAdvisor.proceed(HibernateExceptionAdvisor.java:24)
at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:76)
at org.iana.rzm.facade.admin.trans.loggers.AdminTransactionLoggerAdvisor.logObjectChange(AdminTransactionLoggerAdvisor.java:52)
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:585)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:576)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:562)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.aspectj.AspectJAfterAdvice.invoke(AspectJAfterAdvice.java:42)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
at $Proxy42.transitTransactionToState(Unknown Source)
at sun.reflect.GeneratedMethodAccessor611.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:127)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:115)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:203)
at $Proxy31.transitTransactionToState(Unknown Source)
at org.iana.rzm.web.services.admin.AdminServicesImpl.transitTransactionToState(AdminServicesImpl.java:333)
at $AdminServices_119e3c6be0c.transitTransactionToState($AdminServices_119e3c6be0c.java)
at $AdminServices_119e3c6be0d.transitTransactionToState($AdminServices_119e3c6be0d.java)
at org.iana.rzm.web.pages.admin.EditTransactionState.save(EditTransactionState.java:84)
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:585)
at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:214)
at org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:155)
... 61 more