Error Code 03083 with Nullpointer Exception

Hello,

from time to time it happens that we are receiving the following error from the process engine:

org.camunda.bpm.engine.ProcessEngineException: ENGINE-03083 Exception while executing Batch Database Operations with message ‘### Error flushing statements.
Cause: java.lang.NullPointerException###
Cause: java.lang.NullPointerException’.
Flush summary: [ INSERT HistoricVariableInstanceEntity[10228758]
INSERT HistoricActivityInstanceEventEntity[ServiceTask_03t27mv:10228495]
INSERT VariableInstanceEntity[10228758]
INSERT MessageEntity[10228759]
DELETE MessageEntity[10167775]
DELETE_BULK deleteByteArrayNoRevisionCheck 10167806
UPDATE ExecutionEntity[10167757]]
at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationsException(EnginePersistenceLogger.java:692)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:361)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:324)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:296)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:207)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:136)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:115)
at org.camunda.bpm.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:60)
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:69)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:50)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobHelper.executeJob(ExecuteJobHelper.java:43)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.executeJob(ExecuteJobsRunnable.java:91)
at org.camunda.bpm.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:60)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)Caused by: org.apache.ibatis.exceptions.PersistenceException: ### Error flushing statements.
Cause: java.lang.NullPointerException### Cause: java.lang.NullPointerException
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:255)
at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.flushOperations(DbSqlSession.java:90)
at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:356) … 15 moreCaused by: java.lang.NullPointerException

Additional Context Information:

  • MySQL Database with isolation level Repeatable-Read
  • The error occured especially if a bunch of processintances service tasks are running concurrently (in the process model the service task is checked as “exclusive” (per default)).
  • The service task inserts multiple rows in one of our database table (upon to 500 Insert statements witch each service task run)
  • jobLockTimeInMillis = 300.000 (default)
  • The exception is thrown and a failed Job is created with the exception message above
  • NO external TaskPattern, just simple Delegate
  • When we retry the failed job it can happen, that it runs successfully through
  • Camunda Version 7.10

I assume that this error occurs especially if a bunch of process instances and service tasks are running concurrently.

I was also looking for the 03083 Error Code and found this. There the error code is the same, but we received another exception message. Can anyone help and explain which context can cause such an exception? Or any hints how to reolve them?

Thanks a lot for your help

Cheers
Andy

UPDATE: Here are some additional information.

This is the bpmn file we are using:

  • This bpmn file is a subprocess in our application

  • The parent process is in another file and is using CallActivity in order to execute the subprocess call_external_systems

  • The subprocess instance is hanging up directly after the StartEvent_17bhjtb. “Create Query Logs” does not occur in the activity history. Instead of that we receive the exception above

  • The subprocess is creating multiple query logs in our database (you can understand it like multiple work task, that has to be done in different external systems). Another scheduling component in our application checks our database for new query logs to work on in order to perform these tasks. After one query log is finished, it will inform the engine by triggering a new event subprocess instance from the model below. The event subprocess will then check if all logs are finished. And if so, a “finished all” message will be send out. So the process instance will continue

call_external_systems.bpmn (30.7 KB)

I also figured out, that disablling jdbcBatchProcessing prevent that the exception above. I do not understand what is happening. I just figured it out by looking into the camunda 7.10 Code at

check the docs about the supported isolation level: https://docs.camunda.org/manual/7.10/user-guide/process-engine/database/#isolation-level-configuration
please adjust it accordingly

some limitation regards jdbcBatchProcessing: https://docs.camunda.org/manual/7.10/user-guide/process-engine/database/#jdbc-batch-processing

1 Like