OptimisticLockingException


#1

Hello,

I have a strange situation. When I want to claim a task by a REST API request I get:
11-Jun-2019 20:30:46.249 WARNING [http-nio-8180-exec-8] org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse org.camunda.bpm.engine.OptimisticLockingException: ENGINE-03005 Execution of ‘UPDATE TaskEntity[8d015aa0-8c4c-11e9-a4dd-005056a25cf3]’ failed. Entity was updated by another transaction concurrently.

The request is this:
http://localhost:8180/engine-rest/task/8d015aa0-8c4c-11e9-a4dd-005056a25cf3/claim

This happen on an Oracle 12c database (CentOS) on my test platform.

Instead, on an Oracle 18.4 XE (Windows - development platform) it doesn’t happen.

On both databases I have Read Commited Transaction Isolation Level.

Any ideas,
Thanks


#2

Hi @valiu,

Can you also provide you JDK version and the version of the Oracle JDBC driver? Using the incorrect version has been know to cause incorrect behavior like this one.

You can see the compatibility matrix here: https://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_03_1

Cheers,
Nikola


#3

Hi Nikola,

You are the boss :grinning:

On Camunda engine I used ojdbc6 with jdk1.8 on both platforms.
According to the compatibility matrix you indicated I’ve changed to ojdbc8.

It is working!

However, is strange why with Oracle 18 worked and with Oracle 12 not.

Many thanks,