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

fix constraint error in setup of rest api audit test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 5.9.5-SNAPSHOT
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Rest API

      Description

      00:53:57.212 org.nuxeo.ecm.restapi.test.AuditTest  Time elapsed: 0.845 sec  <<< FAILURE!
      00:53:57.212 java.lang.AssertionError: Before setup errors
      00:53:57.212 	at org.nuxeo.runtime.test.runner.FeaturesRunner.beforeSetup(FeaturesRunner.java:291)
      00:53:57.212 	at org.nuxeo.runtime.test.runner.FeaturesRunner.runChild(FeaturesRunner.java:390)
      00:53:57.212 	at org.nuxeo.runtime.test.runner.FeaturesRunner.runChild(FeaturesRunner.java:55)
      00:53:57.212 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      00:53:57.212 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      00:53:57.212 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      00:53:57.212 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      00:53:57.212 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      00:53:57.212 	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      00:53:57.212 	at org.nuxeo.runtime.test.runner.FeaturesRunner.run(FeaturesRunner.java:357)
      00:53:57.212 	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
      00:53:57.212 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
      00:53:57.212 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
      00:53:57.212 	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
      00:53:57.212 	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
      00:53:57.212 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
      00:53:57.212 	Suppressed: org.nuxeo.ecm.core.api.ConcurrentUpdateException: Failed to save session
      00:53:57.212 		at org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1601)
      00:53:57.212 		at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
      00:53:57.212 		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      00:53:57.212 		at java.lang.reflect.Method.invoke(Method.java:606)
      00:53:57.212 		at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:131)
      00:53:57.212 		at com.sun.proxy.$Proxy31.save(Unknown Source)
      00:53:57.212 		at org.nuxeo.ecm.restapi.test.RestServerInit.populate(RestServerInit.java:89)
      00:53:57.212 		at org.nuxeo.ecm.core.test.CoreFeature.initializeSession(CoreFeature.java:199)
      00:53:57.212 		at org.nuxeo.ecm.core.test.CoreFeature.beforeSetup(CoreFeature.java:128)
      00:53:57.212 		at org.nuxeo.runtime.test.runner.FeaturesRunner.beforeSetup(FeaturesRunner.java:294)
      00:53:57.212 		... 15 more
      00:53:57.212 	Caused by: org.nuxeo.ecm.core.api.ConcurrentUpdateDocumentException: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "HIERARCHY_PARENTID_HIERARCHY_FK: PUBLIC.HIERARCHY FOREIGN KEY(PARENTID) REFERENCES PUBLIC.HIERARCHY(ID) ('a3be7faf-bec9-49ea-a10f-2fc24ad31a90')"; SQL statement:
      00:53:57.212 INSERT INTO "HIERARCHY" ("ID", "PARENTID", "POS", "NAME", "ISPROPERTY", "PRIMARYTYPE", "MIXINTYPES", "ISCHECKEDIN", "BASEVERSIONID", "MAJORVERSION", "MINORVERSION", "ISVERSION") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23506-177]
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:189)
      00:53:57.212 		at org.nuxeo.ecm.core.api.AbstractSession.save(AbstractSession.java:1597)
      00:53:57.212 		... 24 more
      00:53:57.212 	Caused by: org.nuxeo.ecm.core.storage.ConcurrentUpdateStorageException: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "HIERARCHY_PARENTID_HIERARCHY_FK: PUBLIC.HIERARCHY FOREIGN KEY(PARENTID) REFERENCES PUBLIC.HIERARCHY(ID) ('a3be7faf-bec9-49ea-a10f-2fc24ad31a90')"; SQL statement:
      00:53:57.212 INSERT INTO "HIERARCHY" ("ID", "PARENTID", "POS", "NAME", "ISPROPERTY", "PRIMARYTYPE", "MIXINTYPES", "ISCHECKEDIN", "BASEVERSIONID", "MAJORVERSION", "MINORVERSION", "ISVERSION") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23506-177]
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCConnection.checkConcurrentUpdate(JDBCConnection.java:334)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:605)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.writeCreates(JDBCRowMapper.java:502)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.write(JDBCRowMapper.java:472)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.SoftRefCachingRowMapper.write(SoftRefCachingRowMapper.java:427)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.SessionImpl.doFlush(SessionImpl.java:401)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.SessionImpl.flush(SessionImpl.java:375)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.SessionImpl.save(SessionImpl.java:354)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.ra.ConnectionImpl.save(ConnectionImpl.java:188)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.save(SQLSession.java:187)
      00:53:57.212 		... 25 more
      00:53:57.212 	Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity constraint violation: "HIERARCHY_PARENTID_HIERARCHY_FK: PUBLIC.HIERARCHY FOREIGN KEY(PARENTID) REFERENCES PUBLIC.HIERARCHY(ID) ('a3be7faf-bec9-49ea-a10f-2fc24ad31a90')"; SQL statement:
      00:53:57.212 INSERT INTO "HIERARCHY" ("ID", "PARENTID", "POS", "NAME", "ISPROPERTY", "PRIMARYTYPE", "MIXINTYPES", "ISCHECKEDIN", "BASEVERSIONID", "MAJORVERSION", "MINORVERSION", "ISVERSION") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23506-177]
      00:53:57.212 		at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
      00:53:57.212 		at org.h2.message.DbException.get(DbException.java:178)
      00:53:57.212 		at org.h2.message.DbException.get(DbException.java:154)
      00:53:57.212 		at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:373)
      00:53:57.212 		at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:315)
      00:53:57.212 		at org.h2.table.Table.fireConstraints(Table.java:909)
      00:53:57.212 		at org.h2.table.Table.fireAfterRow(Table.java:927)
      00:53:57.212 		at org.h2.command.dml.Insert.insertRows(Insert.java:162)
      00:53:57.212 		at org.h2.command.dml.Insert.update(Insert.java:115)
      00:53:57.212 		at org.h2.command.CommandContainer.update(CommandContainer.java:79)
      00:53:57.212 		at org.h2.command.Command.executeUpdate(Command.java:254)
      00:53:57.212 		at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:199)
      00:53:57.212 		at org.nuxeo.ecm.core.storage.sql.jdbc.JDBCRowMapper.insertSimpleRows(JDBCRowMapper.java:585)
      00:53:57.212 		... 33 more
      00:53:57.212 
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                slacoin Stéphane Lacoin
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: