AnsweredAssumed Answered

Activiti 5.11 - ClassNotFound and then found, crazy run

Question asked by fwachs on Dec 12, 2012
Latest reply on Dec 26, 2012 by jbarrez
Hi all,

I'm having a very rare problem with activiti 5.11 . I have a simple process that only executes code from a certain class, named UpdateSQLProcessTask every x amount of hours.

This is what happened , all in the same run last night while noone had access to the server:

1. First Activiti logs say it couldn't find the java class.

Dec 12, 2012 5:15:22 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiException: couldn't instantiate class com.zukbox.bpmn.process.UpdateSQLProcessTask
        at org.activiti.engine.impl.util.ReflectUtil.instantiate(
        at org.activiti.engine.impl.bpmn.helper.ClassDelegate.instantiateDelegate(
Caused by: org.activiti.engine.ActivitiClassLoadingException: Class not found: com.zukbox.bpmn.process.UpdateSQLProcessTask
        at org.activiti.engine.impl.util.ReflectUtil.loadClass(
        at org.activiti.engine.impl.util.ReflectUtil.instantiate(
        … 58 more
Caused by: java.lang.ClassNotFoundException: com.zukbox.bpmn.process.UpdateSQLProcessTask
        at org.apache.catalina.loader.WebappClassLoader.loadClass(
        at org.apache.catalina.loader.WebappClassLoader.loadClass(
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        [color=#FF0000]at org.activiti.engine.impl.util.ReflectUtil.loadClass([/color]

2. That happened for 10 to 12 timers, then it somehow started working, meaning it found the class and managed to run the code inside
the execute method. ( Take note that this stack trace is following the stack trace above, in red to make it more clear)

[color=#FF0000]at org.activiti.engine.impl.util.ReflectUtil.loadClass([/color]
        … 59 more
Dec 12, 2012 5:15:24 AM org.activiti.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.activiti.engine.ActivitiOptimisticLockingException: TimerEntity[71397] was updated by another transaction concurrently
        at org.activiti.engine.impl.db.DbSqlSession.flushUpdates(
        at org.activiti.engine.impl.db.DbSqlSession.flush(
        at org.activiti.engine.impl.interceptor.CommandContext.flushSessions(

3. This morning, I went into Activiti and checked how the jobs were and most of them ran like option n2 but there were a good amount of jobs that failed with n1.

How can I avoid this from happening again? It has happened to me before but I convinced myself that I was nuts and that I made a mistake. This time I'm sure I didn't screw it !

I'm really worried about this situation, please any kind of guidance will be greatly appreciated.