Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-18639

Issue that prevents direct upgrade from XWiki 3.5.1 to 13.3 on MySQL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.3
    • Old Core
    • Windows 10 Pro 64 bit, Chrome 90, using a local instance of XWiki 13.3 on MySQL 8, Tomcat 9.0.45
    • Unknown

    Description

      STEPS TO REPRODUCE

      1. Create (or unzip) an instance of XWiki 3.5.1 with PostgreSQL (I tested with MySQL 8 and Tomcat 9.0.45)
      2. Close the instance
      3. Go to an instance of 13.3 and copy/cut the
        [...]webapps\xwiki

        folder and replace it (first delete the old one) in the same location on the older (3.5.1) version

      4. Start XWiki

      EXPECTED RESULTS

      The instance of XWiki 3.5.1 is properly migrated to 13.3 without errors and Distribution Wizard is displayed on browser.

      ACTUAL RESULTS

      When starting migration, the process doesn't reach DW as the following error occurs in console:

      2021-05-11 16:20:51,886 [extendion.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@56389b1([extension, index])] ERROR PreferencesConfigurationSource - Failed to access configuration value for property [extension.userAgent]. Ignoring by returning null
      com.xpn.xwiki.XWikiException: Error number 3202 in 3: Exception while reading document [xwiki:XWiki.XWikiPreferences]
              at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1106)
              at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:393)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2151)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2213)
              at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseObject(AbstractXWikiPreferencesConfigurationSource.java:86)
              at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:139)
              at org.xwiki.configuration.internal.AbstractXWikiPreferencesConfigurationSource.getBaseProperty(AbstractXWikiPreferencesConfigurationSource.java:156)
              at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.getPropertyValue(AbstractDocumentConfigurationSource.java:348)
              at org.xwiki.configuration.internal.AbstractDocumentConfigurationSource.containsKey(AbstractDocumentConfigurationSource.java:203)
              at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.containsKey(AbstractCompositeConfigurationSource.java:45)
              at org.xwiki.configuration.internal.AbstractCompositeConfigurationSource.getProperty(AbstractCompositeConfigurationSource.java:95)
              at org.xwiki.extension.internal.DefaultExtensionManagerConfiguration.getUserAgent(DefaultExtensionManagerConfiguration.java:282)
              at org.xwiki.extension.repository.http.internal.DefaultHttpClientFactory.createHttpClientBuilder(DefaultHttpClientFactory.java:65)
              at org.xwiki.extension.repository.http.internal.DefaultHttpClientFactory.createClient(DefaultHttpClientFactory.java:81)
              at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.getRESTResource(XWikiExtensionRepository.java:234)
              at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.getRESTObject(XWikiExtensionRepository.java:305)
              at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.resolve(XWikiExtensionRepository.java:350)
              at org.xwiki.extension.repository.xwiki.internal.XWikiExtensionRepository.resolve(XWikiExtensionRepository.java:340)
              at org.xwiki.extension.repository.AbstractExtensionRepository.exists(AbstractExtensionRepository.java:105)
              at org.xwiki.extension.repository.internal.DefaultExtensionRepositoryManager.exists(DefaultExtensionRepositoryManager.java:408)
              at org.xwiki.extension.internal.DefaultExtensionManager.exists(DefaultExtensionManager.java:132)
              at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateRecommendedVersion(ExtensionIndexJob.java:380)
              at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateExtension(ExtensionIndexJob.java:339)
              at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateExtensions(ExtensionIndexJob.java:554)
              at org.xwiki.extension.index.internal.job.ExtensionIndexJob.validateLastExtensions(ExtensionIndexJob.java:233)
              at org.xwiki.extension.index.internal.job.ExtensionIndexJob.runInternal(ExtensionIndexJob.java:216)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      Caused by: com.xpn.xwiki.XWikiException: Error number 3301 in 3: Exception while switching to database xwiki
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:676)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:631)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:808)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
              at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:976)
              ... 30 common frames omitted
      Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Migration of database [xwiki] has failed, it could not be safely used! Database is currently in version [35102] while the required version is [130200001].
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.preventAccessToOutdatedDb(AbstractDataMigrationManager.java:591)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:542)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:670)
              ... 34 common frames omitted
      Caused by: com.xpn.xwiki.store.migration.DataMigrationException: Unable to update schema of wiki [xwiki]
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:193)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.migrateDatabase(AbstractDataMigrationManager.java:735)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:657)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:362)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsOnlyOnce(AbstractDataMigrationManager.java:637)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.tryToProcceedToMigration(AbstractDataMigrationManager.java:614)
              at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:539)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:670)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:631)
              at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:808)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:577)
              at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:976)
              at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:393)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2151)
              at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2213)
              at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1428)
              at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1395)
              at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1300)
              at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1237)
              at com.xpn.xwiki.XWiki.<init>(XWiki.java:1210)
              at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
              ... 1 common frames omitted
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:826)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:889)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.liquibaseUpdate(HibernateDataMigrationManager.java:289)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:190)
              ... 23 common frames omitted
      Caused by: org.hibernate.HibernateException: com.xpn.xwiki.XWikiException: Error number 3005 in 3: Unable to update schema of database xwiki.
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager$2.lambda$doInHibernate$0(HibernateDataMigrationManager.java:318)
              at org.hibernate.jdbc.WorkExecutor.executeWork(WorkExecutor.java:37)
              at org.hibernate.internal.AbstractSharedSessionContract.lambda$doWork$1(AbstractSharedSessionContract.java:1077)
              at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:306)
              at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1093)
              at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1080)
              at org.hibernate.engine.spi.SessionDelegatorBaseImpl.doWork(SessionDelegatorBaseImpl.java:1105)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager$2.doInHibernate(HibernateDataMigrationManager.java:294)
              at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820)
              ... 26 common frames omitted
      Caused by: com.xpn.xwiki.XWikiException: Error number 3005 in 3: Unable to update schema of database xwiki.
              ... 35 common frames omitted
      Caused by: liquibase.exception.LiquibaseException: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase.xml::R40000-6455963122041717502::xwiki:
           Reason: liquibase.exception.DatabaseException: Referencing column 'XWS_ID' and referenced column 'XWP_ID' in foreign key constraint 'FKDEAEAB5D3433FD87' are incompatible. [Failed SQL: (3780) ALTER TABLE xwiki.xwikidates MODIFY XWS_ID BIGINT]
              at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:124)
              at liquibase.Liquibase.lambda$null$0(Liquibase.java:272)
              at liquibase.Scope.lambda$child$0(Scope.java:160)
              at liquibase.Scope.child(Scope.java:169)
              at liquibase.Scope.child(Scope.java:159)
              at liquibase.Scope.child(Scope.java:138)
              at liquibase.Scope.child(Scope.java:222)
              at liquibase.Liquibase.lambda$update$1(Liquibase.java:271)
              at liquibase.Scope.lambda$child$0(Scope.java:160)
              at liquibase.Scope.child(Scope.java:169)
              at liquibase.Scope.child(Scope.java:159)
              at liquibase.Scope.child(Scope.java:138)
              at liquibase.Liquibase.runInScope(Liquibase.java:2369)
              at liquibase.Liquibase.update(Liquibase.java:217)
              at liquibase.Liquibase.update(Liquibase.java:203)
              at liquibase.Liquibase.update(Liquibase.java:199)
              at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager$2.lambda$doInHibernate$0(HibernateDataMigrationManager.java:314)
              ... 34 common frames omitted
      Caused by: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase.xml::R40000-6455963122041717502::xwiki:
           Reason: liquibase.exception.DatabaseException: Referencing column 'XWS_ID' and referenced column 'XWP_ID' in foreign key constraint 'FKDEAEAB5D3433FD87' are incompatible. [Failed SQL: (3780) ALTER TABLE xwiki.xwikidates MODIFY XWS_ID BIGINT]
              at liquibase.changelog.ChangeSet.execute(ChangeSet.java:672)
              at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:49)
              at liquibase.changelog.ChangeLogIterator$2.lambda$null$0(ChangeLogIterator.java:111)
              at liquibase.Scope.lambda$child$0(Scope.java:160)
              at liquibase.Scope.child(Scope.java:169)
              at liquibase.Scope.child(Scope.java:159)
              at liquibase.Scope.child(Scope.java:138)
              at liquibase.changelog.ChangeLogIterator$2.lambda$run$1(ChangeLogIterator.java:110)
              at liquibase.Scope.lambda$child$0(Scope.java:160)
              at liquibase.Scope.child(Scope.java:169)
              at liquibase.Scope.child(Scope.java:159)
              at liquibase.Scope.child(Scope.java:138)
              at liquibase.Scope.child(Scope.java:222)
              at liquibase.changelog.ChangeLogIterator$2.run(ChangeLogIterator.java:94)
              at liquibase.Scope.lambda$child$0(Scope.java:160)
              at liquibase.Scope.child(Scope.java:169)
              at liquibase.Scope.child(Scope.java:159)
              at liquibase.Scope.child(Scope.java:138)
              at liquibase.Scope.child(Scope.java:222)
              at liquibase.Scope.child(Scope.java:226)
              at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:66)
              ... 50 common frames omitted
      Caused by: liquibase.exception.DatabaseException: Referencing column 'XWS_ID' and referenced column 'XWP_ID' in foreign key constraint 'FKDEAEAB5D3433FD87' are incompatible. [Failed SQL: (3780) ALTER TABLE xwiki.xwikidates MODIFY XWS_ID BIGINT]
              at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:393)
              at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:82)
              at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:150)
              at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1278)
              at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1260)
              at liquibase.changelog.ChangeSet.execute(ChangeSet.java:637)
              ... 70 common frames omitted
      Caused by: java.sql.SQLException: Referencing column 'XWS_ID' and referenced column 'XWP_ID' in foreign key constraint 'FKDEAEAB5D3433FD87' are incompatible.
              at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
              at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
              at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:762)
              at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:646)
              at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
              at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
              at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
              at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:389)
              ... 75 common frames omitted

      Attachments

        Activity

          People

            Unassigned Unassigned
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: