Continuum
  1. Continuum
  2. CONTINUUM-2100

Unable to import data that includes installations

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.3.1, 1.3.1 (Alpha)
    • Fix Version/s: 1.3.3 (Beta)
    • Component/s: Data Management
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      2

      Description

      When importing builds.xml data into 1.3.1, I get the following error:

      ERROR 23505: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'INSTALLATION_PK' defined on 'INSTALLATION'.

      To reproduce, create a 'backups' directory, save the attached builds.xml file into it, and execute:

      java -Xmx512m -jar data-management-cli-1.3.1-app.jar -buildsJdbcUrl jdbc:derby:/path/to/apache-continuum-1.3.1/data/databases/continuum/ -mode IMPORT -directory backups

      The attached builds.xml was exported from a Continuum 1.2 instance using data-management 1.2.3.1.

      If you edit builds.xml and delete the <installations> ... </installations> then the import will complete without error.

      1. builds.xml
        7 kB
        Wendy Smoak
      2. CONTINUUM-2100.patch
        8 kB
        Jose Morales Martinez

        Issue Links

          Activity

          Hide
          Wendy Smoak added a comment -

          I'm also getting this error using the 1.2.3.1 Data Management release to import the attached builds.xml into Continuum 1.2.x.

          Show
          Wendy Smoak added a comment - I'm also getting this error using the 1.2.3.1 Data Management release to import the attached builds.xml into Continuum 1.2.x.
          Hide
          Jose Morales Martinez added a comment -

          The error is generated when insert the profile. This patch correct the bug. It repaces the installations associated to installations for persisted intallations.

          Show
          Jose Morales Martinez added a comment - The error is generated when insert the profile. This patch correct the bug. It repaces the installations associated to installations for persisted intallations.
          Hide
          Maria Catherine Tan added a comment -

          Fixed in revision 759430 with slight modification ( fixed test )

          Thanks Jose!

          Show
          Maria Catherine Tan added a comment - Fixed in revision 759430 with slight modification ( fixed test ) Thanks Jose!
          Hide
          Luca added a comment -

          the 1912 issue was closed so...

          if I try to use 1.3.3 version I get:

          0 [main] INFO org.apache.maven.continuum.management.DataManagementCli - Processing Continuum database...
          63124 [main] WARN JPOX.MetaData - No manager for annotations was found in the CLASSPATH so all annotations are ignored.
          Exception in thread "main" javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'org.apache.maven.continuum.model.project.BuildResult' AS JPOXMETADATA,`THIS`.`BUILD_DEFINITION_ID_OID`,`THIS`.`BUILD_NUMBER`,`THIS`.`BUILD_URL`,`THIS`.`END_TIME`,`THIS`.`ERROR`,`THIS`.`EXIT_CODE`,`THIS`.`ID`,`THIS`.`LAST_CHANGED_DATE`,`THIS`.`MODEL_ENCODING`,`THIS`.`PROJECT_ID_OID`,`THIS`.`START_TIME`,`THIS`.`RESULTSTATE`,`THIS`.`SUCCESS`,`THIS`.`RESULTTRIGGER` FROM `BUILDRESULT` `THIS`" : Unknown column 'THIS.BUILD_URL' in 'field list'.
          at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:636)
          at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049)
          at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444)
          at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85)
          at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232)
          at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287)
          at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180)
          NestedThrowablesStackTrace:
          com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'THIS.BUILD_URL' in 'field list'
          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
          at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
          at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
          at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
          at com.mysql.jdbc.Util.getInstance(Util.java:381)
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
          at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
          at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
          at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
          at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
          at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
          at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
          at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885)
          at org.jpox.store.rdbms.RDBMSManager.executeStatementQuery(RDBMSManager.java:640)
          at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:594)
          at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075)
          at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049)
          at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444)
          at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85)
          at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232)
          at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287)
          at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180)

          the target db belongs to 1.2.3 version....

          Show
          Luca added a comment - the 1912 issue was closed so... if I try to use 1.3.3 version I get: 0 [main] INFO org.apache.maven.continuum.management.DataManagementCli - Processing Continuum database... 63124 [main] WARN JPOX.MetaData - No manager for annotations was found in the CLASSPATH so all annotations are ignored. Exception in thread "main" javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'org.apache.maven.continuum.model.project.BuildResult' AS JPOXMETADATA,`THIS`.`BUILD_DEFINITION_ID_OID`,`THIS`.`BUILD_NUMBER`,`THIS`.`BUILD_URL`,`THIS`.`END_TIME`,`THIS`.`ERROR`,`THIS`.`EXIT_CODE`,`THIS`.`ID`,`THIS`.`LAST_CHANGED_DATE`,`THIS`.`MODEL_ENCODING`,`THIS`.`PROJECT_ID_OID`,`THIS`.`START_TIME`,`THIS`.`RESULTSTATE`,`THIS`.`SUCCESS`,`THIS`.`RESULTTRIGGER` FROM `BUILDRESULT` `THIS`" : Unknown column 'THIS.BUILD_URL' in 'field list'. at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:636) at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049) at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444) at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85) at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232) at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287) at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180) NestedThrowablesStackTrace: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'THIS.BUILD_URL' in 'field list' at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.mysql.jdbc.Util.handleNewInstance(Util.java:406) at com.mysql.jdbc.Util.getInstance(Util.java:381) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1885) at org.jpox.store.rdbms.RDBMSManager.executeStatementQuery(RDBMSManager.java:640) at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:594) at org.jpox.store.rdbms.query.JDOQLQuery.performDeletePersistentAll(JDOQLQuery.java:659) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1120) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1075) at org.jpox.store.query.Query.deletePersistentAll(Query.java:1049) at org.codehaus.plexus.jdo.PlexusJdoUtils.removeAll(PlexusJdoUtils.java:444) at org.apache.continuum.dao.DaoUtilsImpl.eraseDatabase(DaoUtilsImpl.java:85) at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:232) at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:287) at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:180) the target db belongs to 1.2.3 version....
          Hide
          Wendy Smoak added a comment -

          Luca, this issue is also closed... can you open a new issue for your last comment? It doesn't look the same as the original issue here.

          Show
          Wendy Smoak added a comment - Luca, this issue is also closed... can you open a new issue for your last comment? It doesn't look the same as the original issue here.
          Hide
          Luca added a comment -

          ok, CONTINUUM-2408
          thanks

          Show
          Luca added a comment - ok, CONTINUUM-2408 thanks

            People

            • Assignee:
              Maria Catherine Tan
              Reporter:
              Wendy Smoak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: