Hi Team,
Getting NullPointerException: When using Camunda Job Workers in Spring boot Application.
Application is started but when executing the use case where job worker is involved in the process getting NullPointerException by using Camunda Job Workers in Spring boot Application.
Already Gone through the ticket #461 and applied the solution but getting the same issue.
*Applied solution: *
tasks.withType(JavaCompile) {
options.compilerArgs << ‘-parameters’
}
To Reproduce
Write Camunda Job workers in spring boot application with below stack
Spring boot 3.2.2
Camunda 8.4.0
Java 17
Expected behavior
No ERROR Should thrown when executing the use cases.
Log/Stacktrace
java.lang.NullPointerException: Cannot load from object array because "parameterNames" is null
at io.camunda.zeebe.spring.client.bean.MethodInfo.getParameters(MethodInfo.java:72) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.spring.client.jobhandling.JobHandlerInvokingSpringBeans.handle(JobHandlerInvokingSpringBeans.java:48) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.executeJob(JobRunnableFactoryImpl.java:45) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.lambda$create$0(JobRunnableFactoryImpl.java:40) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
2024-12-16T18:17:21.158+05:30 WARN 41484 --- [pool-2-thread-1] io.camunda.zeebe.client.job.worker : Worker eamil failed to handle job with key 2251799815653826 of type email, sending fail command to broker
java.lang.NullPointerException: Cannot load from object array because "parameterNames" is null
at io.camunda.zeebe.spring.client.bean.MethodInfo.getParameters(MethodInfo.java:72) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.spring.client.jobhandling.JobHandlerInvokingSpringBeans.handle(JobHandlerInvokingSpringBeans.java:48) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.executeJob(JobRunnableFactoryImpl.java:45) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.lambda$create$0(JobRunnableFactoryImpl.java:40) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
2024-12-16T18:17:21.171+05:30 WARN 41484 --- [pool-2-thread-1] io.camunda.zeebe.client.job.worker : Worker eamil failed to handle job with key 2251799815653826 of type email, sending fail command to broker
java.lang.NullPointerException: Cannot load from object array because "parameterNames" is null
at io.camunda.zeebe.spring.client.bean.MethodInfo.getParameters(MethodInfo.java:72) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.spring.client.jobhandling.JobHandlerInvokingSpringBeans.handle(JobHandlerInvokingSpringBeans.java:48) ~[spring-client-zeebe-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.executeJob(JobRunnableFactoryImpl.java:45) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at io.camunda.zeebe.client.impl.worker.JobRunnableFactoryImpl.lambda$create$0(JobRunnableFactoryImpl.java:40) ~[zeebe-client-java-8.4.0.jar:8.4.0]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572) ~[na:na]
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]
Environment:
- OS: Windows
- Deployment: SM (Self Managed)
- Spring-Zeebe Version: 8.4.0
- SpringBoot Version: 3.2.2
- Configuration:
zeebe.client.broker.gatewayAddress=127.0.0.1:26500
zeebe.client.security.plaintext=true
zeebe.client.worker.threads=3
zeebe.client.worker.maxJobsActive=20