Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-25708

Fix TestDocumentValidationActivation on MySQL/MariaDB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: Core

      Description

      Since NXP-24757, TestDocumentValidationActivation has two tests failing on MySQL/MariaDB:

      • testOnImportDocumentActivationWithViolationIgnored
      • testOnImportDocumentActivationAfterListeners

      Error is:

      Suppressed: org.nuxeo.ecm.core.api.ConcurrentUpdateException: java.sql.SQLIntegrityConstraintViolationException: (conn:1486954) Duplicate entry '12345' for key 'PRIMARY'
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:184)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:542)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:460)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:437)
      		at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
      		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      		at java.lang.reflect.Method.invoke(Method.java:498)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doInvoke(JDBCMapperConnector.java:111)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.lambda$doConnectAndInvoke$0(JDBCMapperConnector.java:98)
      		at org.nuxeo.runtime.transaction.TransactionHelper.runInTransaction(TransactionHelper.java:589)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.doConnectAndInvoke(JDBCMapperConnector.java:95)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCMapperConnector.invoke(JDBCMapperConnector.java:84)
      		at com.sun.proxy.$Proxy55.write(Unknown Source)
      		at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:360)
      		at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:368)
      		at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:341)
      		at org.nuxeo.ecm.core.storage.sql.SessionImpl.end(SessionImpl.java:1487)
      		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:538)
      		at org.nuxeo.runtime.transaction.TransactionHelper.commitOrRollbackTransaction(TransactionHelper.java:363)
      		at org.nuxeo.runtime.test.runner.TransactionalFeature.nextTransaction(TransactionalFeature.java:76)
      		at org.nuxeo.runtime.test.runner.TransactionalFeature.nextTransaction(TransactionalFeature.java:66)
      		at org.nuxeo.ecm.core.test.CoreFeature.waitForAsyncCompletion(CoreFeature.java:260)
      		at org.nuxeo.ecm.core.test.CoreFeature.cleanupSession(CoreFeature.java:264)
      		at org.nuxeo.ecm.core.test.CoreFeature.afterTeardown(CoreFeature.java:253)
      		at org.nuxeo.runtime.test.runner.FeaturesRunner.lambda$afterTeardown$8(FeaturesRunner.java:184)
      		at org.nuxeo.runtime.test.runner.FeaturesLoader.apply(FeaturesLoader.java:126)
      		... 38 more
      	Caused by: java.sql.SQLIntegrityConstraintViolationException: (conn:1486954) Duplicate entry '12345' for key 'PRIMARY'
      		at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.get(ExceptionMapper.java:152)
      		at org.mariadb.jdbc.internal.util.exceptions.ExceptionMapper.getException(ExceptionMapper.java:118)
      		at org.mariadb.jdbc.MariaDbStatement.executeExceptionEpilogue(MariaDbStatement.java:247)
      		at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:218)
      		at org.mariadb.jdbc.MariaDbPreparedStatementClient.execute(MariaDbPreparedStatementClient.java:153)
      		at org.tranql.connector.jdbc.PreparedStatementHandle.execute(PreparedStatementHandle.java:177)
      		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:530)
      		... 68 more
      	Caused by: java.sql.SQLException: Duplicate entry '12345' for key 'PRIMARY'
      Query is: INSERT INTO `fulltext` (`id`, `jobid`, `simpletext`, `binarytext`, `simpletext_title`, `binarytext_title`) VALUES (?, ?, ?, ?, ?, ?), parameters ['12345','12345',<null>,<null>,<null>,<null>]
      		at org.mariadb.jdbc.internal.util.LogQueryTool.exceptionWithQuery(LogQueryTool.java:146)
      		at org.mariadb.jdbc.internal.protocol.AbstractQueryProtocol.executeQuery(AbstractQueryProtocol.java:215)
      		at org.mariadb.jdbc.MariaDbPreparedStatementClient.executeInternal(MariaDbPreparedStatementClient.java:212)
      		... 71 more
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours
                  6h