Continuum
  1. Continuum
  2. CONTINUUM-2671

Error while importing db to v1.3.8 from v1.2.2

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.3.8
    • Fix Version/s: None
    • Component/s: Data Management, Database
    • Labels:
      None
    • Environment:
      Linux 2.6.18-92.el5
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      http://continuum.apache.org/docs/1.3.8/installation/upgrade.html
      I m following the above guidelines to upgrade our current continuum version(v1.2.2) to the latest stable version (v1.3.8).

      I was able to successfully export the db from previous version but facing issues while importing the same into the new version(v.1.3.8).
      It looks like that few columns are dropped in the new schema which is causing the issue - please let me know if we have a fix for this or is there any other workaround.

      Below is the stack trace of the error that I see:
      -------------------------------------------------------------------------------------------------------------------------------

      [user@buildmachine bin]$ java -Xmx512m -jar data-management-cli-1.3.2-app.jar -buildsJdbcUrl jdbc:derby:/usr/local/apache-continuum-1.3.8/data/databases/continuum -mode IMPORT -directory backups
      0 [main] INFO org.apache.maven.continuum.management.DataManagementCli - Processing Continuum database...
      4179 [main] INFO JPOX.JDO - PersistenceManagerFactory - Vendor: JPOX Version: 1.1.6
      4179 [main] INFO JPOX.JDO - PersistenceManagerFactory initialised for datastore URL=jdbc:derby:/usr/local/apache-continuum-1.3.8/data/databases/continuum driver=org.apache.derby.jdbc.EmbeddedDriver userName=sa
      4768 [main] INFO JPOX.RDBMS - ================ DatabaseAdapter ==================
      4768 [main] INFO JPOX.RDBMS - Adapter : org.jpox.store.rdbms.adapter.DerbyAdapter
      4768 [main] INFO JPOX.RDBMS - Datastore : name="Apache Derby" version="10.1.3.1" (major=10, minor=1, revision=3)
      4768 [main] INFO JPOX.RDBMS - Driver : name="Apache Derby Embedded JDBC Driver" version="10.1.3.1" (major=10, minor=1)
      4768 [main] INFO JPOX.RDBMS - ===================================================
      4803 [main] INFO JPOX.RDBMS.Schema - Initialising Catalog "", Schema "SA" using "None" auto-start option
      4887 [main] INFO JPOX.RDBMS.Schema - Catalog "", Schema "SA" initialised - managing 0 classes
      4917 [main] WARN JPOX.MetaData - No manager for annotations was found in the CLASSPATH so all annotations are ignored.
      5372 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.system.Installation [Table : INSTALLATION, InheritanceStrategy : new-table]
      5388 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.system.Profile [Table : PROFILES, InheritanceStrategy : new-table]
      5389 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.project.BuildQueue [Table : BUILDQUEUE, InheritanceStrategy : new-table]
      5389 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.project.Schedule [Table : SCHEDULE, InheritanceStrategy : new-table]
      5389 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.project.BuildDefinition [Table : BUILDDEFINITION, InheritanceStrategy : new-table]
      5390 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Class : org.apache.maven.continuum.model.project.BuildDefinitionTemplate [Table : BUILDDEFINITIONTEMPLATE, InheritanceStrategy : new-table]
      5395 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Field : org.apache.maven.continuum.model.project.BuildDefinitionTemplate.buildDefinitions [Table : BUILDDEFINITIONTEMPLATE_BUILDDEFINITIONS]
      5404 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Field : org.apache.maven.continuum.model.project.Schedule.buildQueues [Table : SCHEDULE_BUILDQUEUES]
      5406 [main] INFO JPOX.RDBMS.Schema - Managing Persistence of Field : org.apache.maven.continuum.model.system.Profile.environmentVariables [Table : PROFILE_ENVIRONMENTVARIABLES]
      5953 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table BUILDDEFINITIONTEMPLATE
      5985 [main] INFO JPOX.RDBMS - Validated 1 index(es) for table BUILDDEFINITIONTEMPLATE
      5992 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table BUILDQUEUE
      6005 [main] INFO JPOX.RDBMS - Validated 1 index(es) for table BUILDQUEUE
      6016 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table BUILDDEFINITION
      6039 [main] INFO JPOX.RDBMS - Validated 2 foreign key(s) for table BUILDDEFINITION
      6051 [main] INFO JPOX.RDBMS - Validated 3 index(es) for table BUILDDEFINITION
      6061 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table SCHEDULE
      6074 [main] INFO JPOX.RDBMS - Validated 1 index(es) for table SCHEDULE
      6083 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table PROFILES
      6095 [main] INFO JPOX.RDBMS - Validated 2 foreign key(s) for table PROFILES
      6105 [main] INFO JPOX.RDBMS - Validated 3 index(es) for table PROFILES
      6112 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table INSTALLATION
      6123 [main] INFO JPOX.RDBMS - Validated 1 index(es) for table INSTALLATION
      6132 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table BUILDDEFINITIONTEMPLATE_BUILDDEFINITIONS
      6147 [main] INFO JPOX.RDBMS - Validated 2 foreign key(s) for table BUILDDEFINITIONTEMPLATE_BUILDDEFINITIONS
      6155 [main] INFO JPOX.RDBMS - Validated 3 index(es) for table BUILDDEFINITIONTEMPLATE_BUILDDEFINITIONS
      6162 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table PROFILE_ENVIRONMENTVARIABLES
      6179 [main] INFO JPOX.RDBMS - Validated 2 foreign key(s) for table PROFILE_ENVIRONMENTVARIABLES
      6189 [main] INFO JPOX.RDBMS - Validated 3 index(es) for table PROFILE_ENVIRONMENTVARIABLES
      6196 [main] INFO JPOX.RDBMS - Validated 1 unique key(s) for table SCHEDULE_BUILDQUEUES
      6208 [main] INFO JPOX.RDBMS - Validated 2 foreign key(s) for table SCHEDULE_BUILDQUEUES
      6215 [main] INFO JPOX.RDBMS - Validated 3 index(es) for table SCHEDULE_BUILDQUEUES
      Exception in thread "main" javax.jdo.JDODataStoreException: Error executing JDOQL query "SELECT 'org.apache.maven.continuum.model.project.BuildDefinitionTemplate' AS JPOXMETADATA,THIS.CONTINUUM_DEFAULT,THIS.ID,THIS.MODEL_ENCODING,THIS."NAME",THIS.BUILDDEFINITION_TEMPLATE_TYPE FROM BUILDDEFINITIONTEMPLATE THIS" : Column 'THIS.MODEL_ENCODING' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'THIS.MODEL_ENCODING' is not a column in the target table..
      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:82)
      at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:223)
      at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:269)
      at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:170)
      NestedThrowablesStackTrace:
      ERROR 42X04: Column 'THIS.MODEL_ENCODING' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'THIS.MODEL_ENCODING' is not a column in the target table.
      at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
      at org.apache.derby.impl.sql.compile.ColumnReference.bindExpression(Unknown Source)
      at org.apache.derby.impl.sql.compile.ResultColumn.bindExpression(Unknown Source)
      at org.apache.derby.impl.sql.compile.ResultColumnList.bindExpressions(Unknown Source)
      at org.apache.derby.impl.sql.compile.SelectNode.bindExpressions(Unknown Source)
      at org.apache.derby.impl.sql.compile.DMLStatementNode.bindExpressions(Unknown Source)
      at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
      at org.apache.derby.impl.sql.compile.ReadCursorNode.bind(Unknown Source)
      at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown Source)
      at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
      at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
      at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
      at org.jpox.store.rdbms.RDBMSManager.getStatement(RDBMSManager.java:523)
      at org.jpox.store.rdbms.query.StatementText.prepareStatement(StatementText.java:215)
      at org.jpox.store.rdbms.query.RDBMSQuery.getStatement(RDBMSQuery.java:131)
      at org.jpox.store.rdbms.query.JDOQLQuery.performExecute(JDOQLQuery.java:582)
      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:82)
      at org.apache.maven.continuum.management.JdoDataManagementTool.eraseDatabase(JdoDataManagementTool.java:223)
      at org.apache.maven.continuum.management.DataManagementCli.processDatabase(DataManagementCli.java:269)
      at org.apache.maven.continuum.management.DataManagementCli.main(DataManagementCli.java:170)

        Issue Links

          Activity

          Brett Porter made changes -
          Field Original Value New Value
          Status Open [ 1 ] Closed [ 6 ]
          Assignee Brett Porter [ brettporter ]
          Resolution Duplicate [ 3 ]
          Brett Porter made changes -
          Link This issue is superceded by CONTINUUM-2519 [ CONTINUUM-2519 ]

            People

            • Assignee:
              Brett Porter
              Reporter:
              Ravi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: