You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the latest 6.0.0 snapshot, I get an NPE when using the SpringAsyncExecutor, e.g.
Exception in thread "flowable-acquire-async-jobs" java.lang.NullPointerException
at org.flowable.engine.impl.asyncexecutor.DefaultAsyncJobExecutor.getRemainingCapacity(DefaultAsyncJobExecutor.java:254)
at org.flowable.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable.run(AcquireAsyncJobsDueRunnable.java:53)
at java.lang.Thread.run(Thread.java:745)
I believe this is a result of the recent commit 3c22315 - pull request #44. It introduced two additional methods that are called from the start() method in AbstractAsyncExecutor:
initializeRunnables();
startAdditionalComponents();
The problem is that the SpringAsyncExecutor overrides initAsyncJobExecutionThreadPool() to do nothing, since it relies on the spring executor framework. However, startAdditionalComponents (which is not overridden) requires certain data structures to be initialised that would have been done in the initAsyncJobExecutionThreadPool method.
I have thrown together a "fix" which at least resolves the problem but it is a little bit messy - the SpringAsyncExecutor does need to ensure that the timer acquisition thread is created so it cannot simply override the startAdditionalComponents method to do nothing.
It does appear that the inheritance hierarchy is not really correct - should SpringAsyncExecutor really inherit from DefaultAsyncJobExecutor?
I am happy to submit a pull request with what I have done but not sure it is a great fix!
The text was updated successfully, but these errors were encountered:
Using the latest 6.0.0 snapshot, I get an NPE when using the SpringAsyncExecutor, e.g.
Exception in thread "flowable-acquire-async-jobs" java.lang.NullPointerException
at org.flowable.engine.impl.asyncexecutor.DefaultAsyncJobExecutor.getRemainingCapacity(DefaultAsyncJobExecutor.java:254)
at org.flowable.engine.impl.asyncexecutor.AcquireAsyncJobsDueRunnable.run(AcquireAsyncJobsDueRunnable.java:53)
at java.lang.Thread.run(Thread.java:745)
I believe this is a result of the recent commit 3c22315 - pull request #44. It introduced two additional methods that are called from the start() method in AbstractAsyncExecutor:
The problem is that the SpringAsyncExecutor overrides initAsyncJobExecutionThreadPool() to do nothing, since it relies on the spring executor framework. However, startAdditionalComponents (which is not overridden) requires certain data structures to be initialised that would have been done in the initAsyncJobExecutionThreadPool method.
I have thrown together a "fix" which at least resolves the problem but it is a little bit messy - the SpringAsyncExecutor does need to ensure that the timer acquisition thread is created so it cannot simply override the startAdditionalComponents method to do nothing.
It does appear that the inheritance hierarchy is not really correct - should SpringAsyncExecutor really inherit from DefaultAsyncJobExecutor?
I am happy to submit a pull request with what I have done but not sure it is a great fix!
The text was updated successfully, but these errors were encountered: