流程开发,定时任务时间到的时候,程序搜索不到监听的类

Blade 未结 1 3036
chenzw
chenzw 剑者 2020-02-13 19:13

一、该问题的重现步骤是什么?

1. 根据流程设计器设置定时任务

2. 

3.


二、你期待的结果是什么?实际看到的又是什么?

定时器时间到了,则自动跳转到监听的类,有时候正常,有时候就会找不到类

目前监听的类以及所有流程业务写在boot项目内,堆栈异常在flowableDesign里



目前查出了一个现象,如果boot项目和flowable项目同时打开,监听器会优先找flowable项目的类,找不到就会报异常,如果把监听器都配置好了,把flowable项目关闭了,则会在boot项目找监听器的类,则没有问题 以下是流程定时任务的表,可以看得出定时任务找不到监听器的类。 

image.png

能否能同时两个项目都启动,让监听器优先去找boot主项目的类?


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

bladex-boot 2.3.1  macos


四、请提供详细的错误堆栈信息,这很重要。

org.flowable.common.engine.api.FlowableException: couldn't instantiate class org.springblade.flow.listener.TaskReleaseWarningListener

at org.flowable.common.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:140) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.helper.AbstractClassDelegate.defaultInstantiateDelegate(AbstractClassDelegate.java:64) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.helper.AbstractClassDelegate.defaultInstantiateDelegate(AbstractClassDelegate.java:75) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.helper.AbstractClassDelegate.instantiateDelegate(AbstractClassDelegate.java:49) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.helper.ClassDelegate.getExecutionListenerInstance(ClassDelegate.java:138) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:98) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.bpmn.listener.ListenerNotificationHelper.executeExecutionListeners(ListenerNotificationHelper.java:79) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.agenda.AbstractOperation.executeExecutionListeners(AbstractOperation.java:78) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.agenda.AbstractOperation.executeExecutionListeners(AbstractOperation.java:69) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.handleActivityEnd(TakeOutgoingSequenceFlowsOperation.java:106) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.handleFlowNode(TakeOutgoingSequenceFlowsOperation.java:92) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.agenda.TakeOutgoingSequenceFlowsOperation.run(TakeOutgoingSequenceFlowsOperation.java:85) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:88) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:72) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:56) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:25) ~[flowable-engine-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.4.2.jar:6.4.2]

at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.1.12.RELEASE.jar:5.1.12.RELEASE]

at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:128) [flowable-job-service-6.4.2.jar:6.4.2]

at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:116) [flowable-job-service-6.4.2.jar:6.4.2]

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_202]

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_202]

at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_202]

Caused by: org.flowable.common.engine.api.FlowableClassLoadingException: Class not found: org.springblade.flow.listener.TaskReleaseWarningListener

at org.flowable.common.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:90) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.util.ReflectUtil.instantiate(ReflectUtil.java:137) ~[flowable-engine-common-6.4.2.jar:6.4.2]

... 28 common frames omitted

Caused by: java.lang.ClassNotFoundException: org.springblade.flow.listener.TaskReleaseWarningListener

at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_202]

at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_202]

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_202]

at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_202]

at java.lang.Class.forName0(Native Method) ~[na:1.8.0_202]

at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_202]

at org.flowable.common.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:338) ~[flowable-engine-common-6.4.2.jar:6.4.2]

at org.flowable.common.engine.impl.util.ReflectUtil.loadClass(ReflectUtil.java:71) ~[flowable-engine-common-6.4.2.jar:6.4.2]

... 29 common frames omitted


五、若有更多详细信息,请在下面提供。

image.png

image.png

image.png

1条回答
  • 2020-04-16 22:25

    设计器的 

    AsyncExecutorActivate

    改成 false 试试

    0 讨论(0)
提交回复