-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
None
-
None
Environment (Required on creation):
Any Runtime with Camunda 7.18.0-alpha3 or higher.
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
When an persistence exception is thrown and SQLException#getSQLState is null, a null pointer exception is thrown.
17:40:02,812 WARN [org.camunda.bpm.engine.jobexecutor] (pool-9-thread-8) ENGINE-14006 Exception while executing job 30ee6c36-1fd5-11ed-9c0a-bcd07416829c: : java.lang.NullPointerException: Cannot invoke "String.toUpperCase()" because the return value of "java.sql.SQLException.getSQLState()" is null at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.util.ExceptionUtil.checkDeadlockException(ExceptionUtil.java:306) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.errorcode.ExceptionCodeProvider.provideCode(ExceptionCodeProvider.java:76) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.lambda$provideCode$0(ExceptionCodeInterceptor.java:114) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.provideCodeBySupplier(ExceptionCodeInterceptor.java:79) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.provideCode(ExceptionCodeInterceptor.java:123) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.assignCodeToException(ExceptionCodeInterceptor.java:149) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.interceptor.ExceptionCodeInterceptor.execute(ExceptionCodeInterceptor.java:58) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:57) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:110) at org.camunda.bpm.camunda-engine@7.18.0-alpha4-ee//org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:71) at org.jboss.threads@2.4.0.Final//org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:29) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:789) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:44) at org.jboss.threads@2.4.0.Final//org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:809) at java.base/java.lang.Thread.run(Thread.java:833) at org.jboss.threads@2.4.0.Final//org.jboss.threads.JBossThread.run(JBossThread.java:513)
Steps to reproduce (Required on creation):
Create a persistence exception that doesn't have a SQL state assigned. The error in the provided stack trace was provoked by calling UserTransaction#setRollbackOnly.
Observed Behavior (Required on creation):
A null pointer exception is thrown.
Expected behavior (Required on creation):
ExceptionUtil#checkDeadlockException is null safe.
Root Cause (Required on prioritization):
-
Solution Ideas (Optional):
Add null check.
Hints (optional):
-