When concurrent processing (in this case creation) happens this can lead to the following stack raising a SQLIntegrityConstraintViolationException: ORA-00001:
2016-06-21 15:28:57.066+0200|ERROR|SDSI21|[http-bio-0.0.0.0-9080-exec-21]|org.nuxeo.ecm.core.storage.sql.SessionImpl|STI-2.12.4.2-SDSI21-20160621152854597-69f2e9a8-040f-4806-a3d7-1a4acf5bcf4d|Exception during transaction commit org.nuxeo.ecm.core.api.NuxeoException: Failed to update read acls at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.updateReadAcls(JDBCMapper.java:992) ~[nuxeo-core-storage-sql-7.10.jar:na] at sun.reflect.GeneratedMethodAccessor497.invoke(Unknown Source) ~[na:na] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_66] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_66] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:22) ~[nuxeo-core-storage-sql-7.10.jar:na] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:55) ~[nuxeo-core-storage-sql-7.10.jar:na] at com.sun.proxy.$Proxy90.updateReadAcls(Unknown Source) ~[na:na] at org.nuxeo.ecm.core.storage.sql.UnifiedCachingMapper.updateReadAcls(UnifiedCachingMapper.java:103) ~[nuxeo-core-storage-sql-7.10.jar:na] at org.nuxeo.ecm.core.storage.sql.SessionImpl.updateReadAcls(SessionImpl.java:1252) ~[nuxeo-core-storage-sql-7.10.jar:na] at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:333) ~[nuxeo-core-storage-sql-7.10.jar:na] at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1359) ~[nuxeo-core-storage-sql-7.10.jar:na] at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:61) [geronimo-transaction-2.2.1.jar:2.2.1] at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:569) [geronimo-transaction-2.2.1.jar:2.2.1] at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:548) [geronimo-transaction-2.2.1.jar:2.2.1] at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:408) [geronimo-transaction-2.2.1.jar:2.2.1] at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:255) [geronimo-transaction-2.2.1.jar:2.2.1] at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) [geronimo-transaction-2.2.1.jar:2.2.1] at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:537) [nuxeo-runtime-jtajca-7.10.jar:na] at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:311) [nuxeo-runtime-jtajca-7.10.jar:na] at org.nuxeo.ecm.webengine.app.WebEngineFilter.closeTx(WebEngineFilter.java:167) [nuxeo-webengine-core-7.10.jar:na] at org.nuxeo.ecm.webengine.app.WebEngineFilter.cleanup(WebEngineFilter.java:153) [nuxeo-webengine-core-7.10.jar:na] at org.nuxeo.ecm.webengine.app.WebEngineFilter.doFilter(WebEngineFilter.java:100) [nuxeo-webengine-core-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.webengine.jaxrs.context.RequestContextFilter.run(RequestContextFilter.java:41) [nuxeo-webengine-jaxrs-7.10.jar:na] at org.nuxeo.ecm.webengine.jaxrs.HttpFilter.doFilter(HttpFilter.java:42) [nuxeo-webengine-jaxrs-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at com.afp.iris.sr.commons.logging.filter.IrisFilter.doFilter(IrisFilter.java:170) [iris-sr-commons-logging-3.0.0.6-SNAPSHOT.jar:3.0.0.6-SNAPSHOT] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoThreadTrackerFilter.doFilter(NuxeoThreadTrackerFilter.java:28) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.core.management.jtajca.internal.Log4jWebFilter.doFilter(Log4jWebFilter.java:67) [nuxeo-core-management-jtajca-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.ui.web.rest.FancyURLFilter.doFilter(FancyURLFilter.java:118) [nuxeo-platform-ui-web-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoRequestControllerFilter.doFilter(NuxeoRequestControllerFilter.java:140) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.webdav.service.WIRequestFilter.doFilter(WIRequestFilter.java:59) [nuxeo-webdav-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilterInternal(NuxeoAuthenticationFilter.java:580) [nuxeo-platform-web-common-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:36) [nuxeo-platform-web-common-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.oauth.NuxeoOAuthFilter.doFilter(NuxeoOAuthFilter.java:120) [nuxeo-platform-oauth-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34) [nuxeo-platform-web-common-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.oauth2.NuxeoOAuth2Filter.doFilter(NuxeoOAuth2Filter.java:68) [nuxeo-platform-oauth-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.service.NuxeoAuthFilterChain.doFilter(NuxeoAuthFilterChain.java:34) [nuxeo-platform-web-common-7.10.jar:na] at org.nuxeo.ecm.platform.ui.web.auth.NuxeoAuthenticationFilter.doFilter(NuxeoAuthenticationFilter.java:393) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.web.common.requestcontroller.filter.NuxeoCorsFilter.doFilter(NuxeoCorsFilter.java:49) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.web.common.exceptionhandling.NuxeoExceptionFilter.doFilter(NuxeoExceptionFilter.java:75) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.nuxeo.ecm.platform.web.common.encoding.NuxeoEncodingFilter.doFilter(NuxeoEncodingFilter.java:73) [nuxeo-platform-web-common-7.10.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) [catalina.jar:7.0.64] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) [catalina.jar:7.0.64] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) [catalina.jar:7.0.64] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) [catalina.jar:7.0.64] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) [catalina.jar:7.0.64] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) [catalina.jar:7.0.64] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) [catalina.jar:7.0.64] at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) [catalina.jar:7.0.64] at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:271) [catalina.jar:7.0.64] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) [catalina.jar:7.0.64] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) [catalina.jar:7.0.64] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) [tomcat-coyote.jar:7.0.64] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625) [tomcat-coyote.jar:7.0.64] at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316) [tomcat-coyote.jar:7.0.64] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_66] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_66] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-coyote.jar:7.0.64] at java.lang.Thread.run(Unknown Source) [na:1.8.0_66] Caused by: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: violation de contrainte unique (CMS_TEST_TU_QCO.HIERREADACL_PK) ORA-06512: à "CMS_TEST_TU_QCO.NX_UPDATE_READ_ACLS", ligne 8 ORA-06512: à ligne 1 at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:999) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1890) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1855) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:304) ~[ojdbc6-11.2.0.2.0.jar:11.2.0.2.0] at org.tranql.connector.jdbc.StatementHandle.execute(StatementHandle.java:119) ~[tranql-connector-1.8.jar:1.8] at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapper.updateReadAcls(JDBCMapper.java:989) ~[nuxeo-core-storage-sql-7.10.jar:na] ... 79 common frames omitted
For instance in this case the call should use checkConcurrentUpdate or Dialect.isConcurrentUpdateException like in JDBCRowMapper for instance and return a meaninful exception so that upstream the client can deal with it.