1 Reply Latest reply on Oct 8, 2013 1:12 AM by Maciej Swiderski

    Issues setting up own EscalatedDeadlineHandler

    Gaurav Rathi Newbie

      Hello,

      I am new to JBPM world, when I am trying to set my own EscalatedDeadlineHandler and call the service of my application is is failing to call the service.

      I am getting below exception.

       

      2013-10-04 09:46:38,803 | pool-2-thread-1 |                 |       |            | ERROR | TaskService.innerRun | Operation failed

      java.lang.RuntimeException: Operation failed

        at org.jbpm.task.service.TaskServiceSession.executeEscalatedDeadline(TaskServiceSession.java:1206) ~[jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskService.executeEscalatedDeadline(TaskService.java:290) ~[jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at org.jbpm.task.service.TaskService$ScheduledTaskDeadline.call(TaskService.java:426) ~[jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_21]

        at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_21]

        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_21]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21]

        at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]

      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userContext': Scope 'session' is not active for the current thread; consider defining a scoped proxy for this bean if you intend to refer to it from a singleton; nested exception is java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:342) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) ~[spring-context-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at com.scor.omega2.core.presentation.utils.spring.BeanApplicationContext.getBean(BeanApplicationContext.java:49) ~[BeanApplicationContext.class:na]

        at com.scor.omega2.core.presentation.utils.AopContextLoader.loadContextAround(AopContextLoader.java:47) ~[AopContextLoader.class:na]

        at sun.reflect.GeneratedMethodAccessor135.invoke(Unknown Source) ~[na:na]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21]

        at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]

        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:91) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at com.scor.omega2.core.service.utils.logger.AopLogger.logMethodAround(AopLogger.java:46) ~[omega2-core-1.0-SNAPSHOT.jar:na]

        at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) ~[na:na]

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21]

        at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21]

        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at com.sun.proxy.$Proxy186.checkNotification(Unknown Source) ~[na:na]

        at com.scor.omega2.core.workflow.MyOwnEscalatedDeadlineHandler.executeEscalatedDeadline(MyOwnEscalatedDeadlineHandler.java:39) ~[omega2-shared-services-1.0-SNAPSHOT.jar:na]

        at org.jbpm.task.service.TaskServiceSession.executeEscalatedDeadline(TaskServiceSession.java:1191) ~[jbpm-human-task-core-5.4.0.Final.jar:5.4.0.Final]

        ... 9 common frames omitted

      Caused by: java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet/DispatcherPortlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

        at org.springframework.web.context.request.RequestContextHolder.currentRequestAttributes(RequestContextHolder.java:131) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.web.context.request.SessionScope.get(SessionScope.java:90) ~[spring-web-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:328) ~[spring-beans-3.1.1.RELEASE.jar:3.1.1.RELEASE]

        ... 35 common frames omitted

       

       

      Any one have got such kind of issues ?

      Thanks for your help.