Getting 'ENGINE-03004 Exception while executing Database Operation 'UPDATE EverLivingJobEntity' Error

Hi Camunda Team,

Would appreciate some hints on an error below which we never faced before. We’re using Camunda 7.16 version with Postgress DB.

Exception Trace Snippet:
Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03004 Exception while executing Database Operation ‘UPDATE EverLivingJobEntity[0f477c3d-f39d-11eb-9e59-76d203510f29]’ with message ’

Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.JobEntity.updateEverLivingJob (batch index #1) failed. Cause: java.sql.BatchUpdateException: Batch entry 0 update ACT_RU_JOB

     SET REV_ =  130557,
        EXECUTION_ID_ = NULL,
        LOCK_EXP_TIME_ = NULL,
        LOCK_OWNER_ = NULL,
        RETRIES_ = 3,
        EXCEPTION_STACK_ID_ = NULL,
        EXCEPTION_MSG_ = NULL,
        FAILED_ACT_ID_ = NULL,
        DUEDATE_ = '2022-05-11 00:01:00+00',
        SUSPENSION_STATE_ = 1,
        PROCESS_DEF_ID_ = NULL,
        PROCESS_DEF_KEY_ = NULL,
        JOB_DEF_ID_ = NULL,
        DEPLOYMENT_ID_ = NULL,
        HANDLER_CFG_ = '{"countEmptyRuns":0,"immediatelyDue":false,"minuteFrom":0,"minuteTo":59}',
        PRIORITY_ = 0,
        SEQUENCE_COUNTER_ = 13,
        LAST_FAILURE_LOG_ID_ = NULL 
    where ID_= '0f477c3d-f39d-11eb-9e59-76d203510f29'
    and REV_ = 130556 was aborted: ERROR: column "last_failure_log_id_" of relation "act_ru_job" does not exist

Position: 580 Call getNextException to see other errors in the batch.

1 Like

Hi Team,

Any update on this?

Did you perhaps upgrade the engine version without upgrading your database?

If this is something that is critical to your system, I’d suggest getting a support contract and raising a support ticket.

Hi Shruti,

We are facing the same problem recently. Have you found the cause and a solution?

EDIT: after some research, it seems to be related to this change: CAM-14006: avoid job log query on incident creation by ThorbenLindhauer · Pull Request #1665 · camunda/camunda-bpm-platform (github.com)
[CAM-14006] Query for retrieving last failure log id performs poorly - camunda JIRA

Maybe the database migration didn’t execute correctly, which is why this field is missing in the database. If so, the questions are: 1) why did the db migration not execute successfully? and 2) how do we fix it?

Kind regards,

Mitchel Nijdam

Hi @MitchelNijdam,

How did you perform the database migration?

Did you do it manually?

Did you use Liquibase?

Best,
Tassilo

We are using Camunda with Spring Boot. I assume the Liquibase scripts are executed on startup automatically, as I have never applied anything manually.

I have the same problem with Camunda + Spring Boot. Also no manual database migration.

Same issue

I’ll ask the same question I asked OP:

Liquibase is not turned on by default.
If you have ever updated your engine, you must update your DB. You can do this manually using the scripts provided or by enabling Liquibase. But you still have to update your DB.

Dropping the database and recreating helps in this case.