cancel
Showing results for 
Search instead for 
Did you mean: 

Error when claiming a user task

ganeshr
Champ in-the-making
Champ in-the-making
Hi,

   I'm getting following error when claiming a task,
       Caused by: org.activiti.engine.ActivitiException: Error while evalutaing expression
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:59)
        at org.activiti.engine.impl.bpmn.listener.ExpressionTaskListener.notify(ExpressionTaskListener.java:33)
        at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
        at org.activiti.engine.impl.persistence.entity.TaskEntity.fireEvent(TaskEntity.java:525)
        … 42 more
Caused by: org.activiti.engine.impl.javax.el.ELException: Cannot coerce from class org.activiti.engine.impl.persistence.entity.TaskEntity to interface org.activiti.engine.delegate.DelegateTask
        at org.activiti.engine.impl.juel.TypeConverterImpl.coerceToType(TypeConverterImpl.java:350)
        at org.activiti.engine.impl.juel.TypeConverterImpl.convert(TypeConverterImpl.java:365)
        at org.activiti.engine.impl.juel.ExpressionFactoryImpl.coerceToType(ExpressionFactoryImpl.java:418)
        at org.activiti.engine.impl.javax.el.BeanELResolver.coerceValue(BeanELResolver.java:582)
        at org.activiti.engine.impl.javax.el.BeanELResolver.coerceParams(BeanELResolver.java:574)
        at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:479)
        at org.activiti.engine.impl.javax.el.CompositeELResolver.invoke(CompositeELResolver.java:397)
        at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:91)
        at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
        at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
        at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
        at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
        at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
        … 47 more

   I'm getting the above exception when I place the bpmn specific jar( containing task listener classes) in tomcat/lib folder instead of placing them in activit-explorer/WEB-INF/lib or activit-rest/WEB-INF/lib folder. If jar is placed in activit-explorer/WEB-INF/lib or activit-rest/WEB-INF/lib it is working.
  Is there a way where I can acheive by placing the jar in tomcat lib folder? So that I reduce the overhead of placing the jar in activiti-explorer each time a new version is released.
3 REPLIES 3

jbarrez
Star Contributor
Star Contributor
Is there a way where I can acheive by placing the jar in tomcat lib folder? So that I reduce the overhead of placing the jar in activiti-explorer each time a new version is released.

Generally, this is regarded as not a very good practice. The reason is that it can mess up classloaders. I don't know why you see the issue exactly, but it has to do something with those classloaders….

ganeshr
Champ in-the-making
Champ in-the-making
The problem is if I place the jar in activiti-explorer/rest  lib folder, then everytime if I want to upgrade to new activiti version, need to take care of placing again business process specific jars in lib folder. Instead I want to place the business process specific jar in common place. So that I need not to worry about whether admin team has taken care of this specific step of placing jars  in activiti apps when upgrade happens. any suggestions?

frederikherema1
Star Contributor
Star Contributor
I'm afraid there is no other way than patching the war with your logic or removing the activiti-*.jar's from the WAR and moving them to the shared-lib folder instead.