<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic couldn't instantiate class message in ACT_RU_JOB, but no exception thrown in Tomcat in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192737#M145867</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the Activiti Explorer in order to deploy my process and I trigger its execution by using the REST api (both activiti-explorer and activiti-rest share the same database). The first task in my process is an async Java Service Task. I am pretty sure that the corresponding class is contained in a jar that's in the right places i.e. %catalina_home%/webapps/activiti-explorer/WEB-INF/lib and %catalina_home%/webapps/activiti-rest/WEB-INF/lib.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that sometimes (not always) some process executions freeze in this very first task but no exception is thrown (at least it is not visible in Tomcat's console/logs). However, I am able to see some exception messages in the ACT_RU_JOB table: couldn't instantiate class my.package.InitTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using Activiti 5.16.1, Tomcat 8.0.14 and JDK 1.8.25&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Christos&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Jul 2015 10:21:26 GMT</pubDate>
    <dc:creator>ctri</dc:creator>
    <dc:date>2015-07-24T10:21:26Z</dc:date>
    <item>
      <title>couldn't instantiate class message in ACT_RU_JOB, but no exception thrown in Tomcat</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192737#M145867</link>
      <description>Hello,I am using the Activiti Explorer in order to deploy my process and I trigger its execution by using the REST api (both activiti-explorer and activiti-rest share the same database). The first task in my process is an async Java Service Task. I am pretty sure that the corresponding class is cont</description>
      <pubDate>Fri, 24 Jul 2015 10:21:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192737#M145867</guid>
      <dc:creator>ctri</dc:creator>
      <dc:date>2015-07-24T10:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: couldn't instantiate class message in ACT_RU_JOB, but no exception thrown in Tomcat</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192738#M145868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is that the only exception log you see "couldn't instantiate class my.package.InitTask"? there should be a root cause for it. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I can think of is that the class is not on the classpath, but you say you've verified the jar is in /lib of both … &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 12:29:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192738#M145868</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2015-07-28T12:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: couldn't instantiate class message in ACT_RU_JOB, but no exception thrown in Tomcat</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192739#M145869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your prompt response. Indeed, there is a root cause stored in the ACT_GE_BYTEARRAY table:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;org.activiti.engine.ActivitiException: couldn't instantiate class gr.grnet.middleware.fulfillment.vpn.InitTask&lt;BR /&gt; at org.activiti.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:132)&lt;BR /&gt; at org.activiti.engine.impl.bpmn.helper.ClassDelegate.instantiateDelegate(ClassDelegate.java:192)&lt;BR /&gt; at org.activiti.engine.impl.bpmn.helper.ClassDelegate.getActivityBehaviorInstance(ClassDelegate.java:165)&lt;BR /&gt; at org.activiti.engine.impl.bpmn.helper.ClassDelegate.execute(ClassDelegate.java:114)&lt;BR /&gt; at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:60)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)&lt;BR /&gt; at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(AtomicOperationTransitionNotifyListenerStart.java:52)&lt;BR /&gt; at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:56)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)&lt;BR /&gt; at org.activiti.engine.impl.pvm.runtime.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:49)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:621)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:616)&lt;BR /&gt; at org.activiti.engine.impl.pvm.runtime.AtomicOperationTransitionCreateScope.execute(AtomicOperationTransitionCreateScope.java:49)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:96)&lt;BR /&gt; at org.activiti.engine.impl.jobexecutor.AsyncContinuationJobHandler.execute(AsyncContinuationJobHandler.java:35)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:83)&lt;BR /&gt; at org.activiti.engine.impl.persistence.entity.MessageEntity.execute(MessageEntity.java:29)&lt;BR /&gt; at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:73)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)&lt;BR /&gt; at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)&lt;BR /&gt; at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)&lt;BR /&gt; at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)&lt;BR /&gt; at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)&lt;BR /&gt; at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:52)&lt;BR /&gt; at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)&lt;BR /&gt; at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)&lt;BR /&gt; at java.lang.Thread.run(Thread.java:745)&lt;BR /&gt;Caused by: org.activiti.engine.ActivitiClassLoadingException: Class not found: gr.grnet.middleware.fulfillment.vpn.InitTask&lt;BR /&gt; at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:82)&lt;BR /&gt; at org.activiti.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:129)&lt;BR /&gt; … 34 more&lt;BR /&gt;Caused by: java.lang.ClassNotFoundException: gr.grnet.middleware.fulfillment.vpn.InitTask&lt;BR /&gt; at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1293)&lt;BR /&gt; at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1145)&lt;BR /&gt; at java.lang.Class.forName0(Native Method)&lt;BR /&gt; at java.lang.Class.forName(Class.java:348)&lt;BR /&gt; at org.activiti.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:63)&lt;BR /&gt; … 35 more&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;I have merged the activiti-rest and the activiti-explorer apps in a single app and retried (I made sure there is only one running instance of the process engine). The point is that this ClassNotFoundException error, occurs only under stress conditions, i.e. when I try to create many process instances over a short period of time and - more importantly - does not occur every time I try to create the Activiti process. I have double-checked the jar file is in the WEB-INF/lib directory of the merged activiti webapp but nowhere else in the Tomcat installation directory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jul 2015 14:12:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192739#M145869</guid>
      <dc:creator>ctri</dc:creator>
      <dc:date>2015-07-28T14:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: couldn't instantiate class message in ACT_RU_JOB, but no exception thrown in Tomcat</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192740#M145870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;somehow the class you are trying to instantiate is not in the current class loader.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is located this class? gr.grnet.middleware.fulfillment.vpn.InitTask&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could just investigate around this method in ReflectUtil class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public static Object instantiate(String className) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class e = loadClass(className);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return e.newInstance();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception var2) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new ActivitiException("couldn\'t instantiate class " + className, var2);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/code&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could check what's the classLoader used when it fails. &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2015 08:28:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/couldn-t-instantiate-class-message-in-act-ru-job-but-no/m-p/192740#M145870</guid>
      <dc:creator>vasile_dirla</dc:creator>
      <dc:date>2015-08-05T08:28:34Z</dc:date>
    </item>
  </channel>
</rss>

