-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.4
-
Component/s: Events / Works
-
Tags:
The following is logged on SQL Server in rare situations:
2015-07-02 00:18:56,967 ERROR [Nuxeo-Work-default-3] [org.nuxeo.ecm.core.work.WorkManagerImpl] Uncaught error on thread Nuxeo-Work-default-3 java.lang.RuntimeException: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: java.sql.BatchUpdateException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:289) at org.nuxeo.ecm.core.work.WorkHolder.run(WorkHolder.java:52) 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:745) Caused by: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: java.sql.BatchUpdateException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:298) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:579) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:481) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:451) at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:22) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:55) at com.sun.proxy.$Proxy66.write(Unknown Source) at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:356) at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:357) at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:330) at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1350) at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:61) at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:569) at org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:548) at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:408) at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:255) at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) at org.nuxeo.runtime.jtajca.NuxeoContainer$UserTransactionImpl.commit(NuxeoContainer.java:537) at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:311) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransaction(AbstractWork.java:367) at org.nuxeo.ecm.core.work.AbstractWork.runWorkWithTransactionAndCheckExceptions(AbstractWork.java:304) at org.nuxeo.ecm.core.work.AbstractWork.run(AbstractWork.java:273) ... 4 more Suppressed: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: java.sql.BatchUpdateException: The INSERT statement conflicted with the FOREIGN KEY constraint "content_id_hierarchy_fk". The conflict occurred in database "dbjabba5", table "dbo.hierarchy", column 'id'. ... 29 more Caused by: java.sql.BatchUpdateException: The INSERT statement conflicted with the FOREIGN KEY constraint "content_id_hierarchy_fk". The conflict occurred in database "dbjabba5", table "dbo.hierarchy", column 'id'. at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069) at org.tranql.connector.jdbc.StatementHandle.executeBatch(StatementHandle.java:155) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:564) ... 27 more Caused by: java.sql.BatchUpdateException: Transaction (Process ID 56) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction. at net.sourceforge.jtds.jdbc.JtdsStatement.executeBatch(JtdsStatement.java:1069) at org.tranql.connector.jdbc.StatementHandle.executeBatch(StatementHandle.java:155) at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:564) ... 27 more
- depends on
-
NXP-17430 Add better logs when Work instances fail
- Resolved