In some cases (Oracle 11) we have this spurious exception even if low-level change tokens are disabled:
WARN [SystemLogRestlet] ----- WebDriver: Starting test 'org.nuxeo.ftest.cap.ITCollectionsTest#testAddDocumentToCollectionAndRemove' ERROR [DefaultNuxeoExceptionHandler] javax.servlet.ServletException: On requestURL: http://localhost:8080/nuxeo/view_documents.faces Caused by: org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to save session, 1992f732-8cb1-4cb7-96c4-9d2265b818cd at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.updateSimpleRows(JDBCRowMapper.java:640) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeUpdates(JDBCRowMapper.java:489) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:439)
Adding more debug info shows that Oracle returns values of -2 (SUCCESS_NO_INFO) for the update counts in some circumstances, see http://stackoverflow.com/questions/19022175/executebatch-method-return-array-of-value-2-in-java
This is a behavior of Oracle 11 that is fixed in Oracle 12, compare
https://docs.oracle.com/cd/E18283_01/java.112/e16548/oraperf.htm#i1057545 and https://docs.oracle.com/database/121/JJDBC/oraperf.htm#JJDBC28773.
This will be taken into account and fixed when doing the work for NXP-22019