# Spring boot flowable errors

**URL:** <https://forum.flowable.org/t/spring-boot-flowable-errors/204>\
**Category:** Uncategorized\
**Created:** [January 16, 2017, 10:35pm UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204 "2017-01-16T22:35:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![flowablespringuser](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@flowablespringuser](https://forum.flowable.org/u/flowablespringuser)\
**Post date:** [January 16, 2017, 10:35pm UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204/1 "2017-01-16T22:35:47Z")

</div>

I have been attempting to run the flowable-spring-boot-sample-basic test project.

The application starts and runs, however I see this issue in the console within IntelliJ.

A NullPointerException in flowable-acquire-async-jobs.

Am I missing something in configuration?

2017-01-16 17:28:28.509 INFO 6048 — [main] o.f.engine.impl.ProcessEngineImpl : ProcessEngine default created  
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)  
2017-01-16 17:28:28.521 INFO 6048 — [main] o.f.e.i.a.AbstractAsyncExecutor : Starting up the async job executor [org.flowable.spring.SpringAsyncExecutor].  
2017-01-16 17:28:28.522 INFO 6048 — [Thread-3] o.f.e.i.a.AcquireAsyncJobsDueRunnable : {} starting to acquire async jobs due  
2017-01-16 17:28:28.522 INFO 6048 — [Thread-4] o.f.e.i.a.AcquireTimerJobsRunnable : {} starting to acquire async jobs due  
2017-01-16 17:28:28.522 INFO 6048 — [Thread-5] o.f.e.i.a.ResetExpiredJobsRunnable : {} starting to reset expired jobs  
2017-01-16 17:28:29.145 INFO 6048 — [main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup  
customerId=243  
2017-01-16 17:28:29.776 INFO 6048 — [main] flowable.Application : Started Application in 5.253 seconds (JVM running for 5.963)

---

<div class="post-metadata">

**Author:** ![flowablespringuser](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@flowablespringuser](https://forum.flowable.org/u/flowablespringuser)\
**Post date:** [January 16, 2017, 11:46pm UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204/2 "2017-01-16T23:46:52Z")

</div>

Have started trying some of the other sample apps. The flowable-spring-boot-sample-jpa also has issues.

When running the Junit ProcessEngineAutoConfigurationTest it works successfully.

However, when attempting to actually run the application, I see two errors.

One is the same NullPointer listed above.

The second is:

Caused by: org.flowable.engine.common.api.FlowableException: Query return 3 results instead of max 1  
at org.flowable.engine.impl.AbstractQuery.executeSingleResult(AbstractQuery.java:184)  
at org.flowable.engine.impl.AbstractQuery.execute(AbstractQuery.java:161)  
at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:39)  
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:80)  
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:59)  
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:44)  
at org.flowable.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:51)  
at org.flowable.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:64)  
at org.flowable.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)  
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)  
at org.flowable.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)  
at org.flowable.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)  
at org.flowable.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:44)  
at org.flowable.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:39)  
at org.flowable.engine.impl.AbstractQuery.singleResult(AbstractQuery.java:124)  
at flowable.PhotoService.launchPhotoProcess(Application.java:82)

I have tried these two spring boot applications on Activity 5.22 and both run successfully.

---

<div class="post-metadata">

**Author:** ![yvo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yvo/32/2231_2.png) [@yvo](https://forum.flowable.org/u/yvo)\
**Post date:** [January 17, 2017, 11:13am UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204/3 "2017-01-17T11:13:22Z")

</div>

Hi,

about the two issues;

The first; the NPE; did you make any modifications that could be causing this? When I run the latest code the sample-basic runs without throwing a NPE.

The second; there was an issue with the BPMN XML. The subprocess did not include an end event. I fixed it and pushed it to the repo.

Regards,

Yvo

---

<div class="post-metadata">

**Author:** ![flowablespringuser](https://avatars.discourse-cdn.com/v4/letter/f/5fc32e/32.png) [@flowablespringuser](https://forum.flowable.org/u/flowablespringuser)\
**Post date:** [January 17, 2017, 12:45pm UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204/4 "2017-01-17T12:45:58Z")

</div>

I looked through github last night and it seems that the NPE issue should be resolved in the next RC by

> <https://github.com/flowable/flowable-engine/commit/f73e62bf2ee9ea67cf4af13076cb675e077114b1>

I was just a little taken aback, because in both sample projects the unit tests passed successfully, but actually running the Spring Boot app has issues. The unit tests might need to be improved in this area.

---

<div class="post-metadata">

**Author:** ![yvo](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/yvo/32/2231_2.png) [@yvo](https://forum.flowable.org/u/yvo)\
**Post date:** [January 17, 2017, 12:51pm UTC](https://forum.flowable.org/t/spring-boot-flowable-errors/204/5 "2017-01-17T12:51:02Z")

</div>

Hi,

I was assuming you were on the latest master revision of the code. The fix you are referring to is in there.

You’re right. The unit tests can be improved. We’re always open to a PR 😉

Regards,

Yvo
