Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
13.3
-
Windows 10 Pro 64 bit, Chrome 90, using a local instance of XWiki 13.3 on PostgreSQL 13, Tomcat 9.0.45
-
Unknown
-
Description
STEPS TO REPRODUCE
- Create (or unzip) an instance of XWiki 3.5.1 with PostgreSQL (I tested with PostgreSQL 13 and Tomcat 9.0.45)
- Close the instance
- 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
- 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:01:25,103 [extendion.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@47bf2399([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: Data migration R40000XWIKI6990 failed at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:120) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:837) at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.migrateDatabase(AbstractDataMigrationManager.java:736) 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 3005 in 3: R40000XWIKI6990 migration failed while converting ID from [1695638801] to [1616181401201288499] at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.convertDbId(R40000XWIKI6990DataMigration.java:463) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.hibernateMigrate(R40000XWIKI6990DataMigration.java:819) at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:118) ... 24 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.executeWrite(XWikiHibernateBaseStore.java:935) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration.convertDbId(R40000XWIKI6990DataMigration.java:458) ... 26 common frames omitted Caused by: javax.persistence.PersistenceException: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:154) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1681) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractIdConversionHibernateCallback.executeIdUpdate(R40000XWIKI6990DataMigration.java:280) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$3.doSingleUpdate(R40000XWIKI6990DataMigration.java:833) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractIdConversionHibernateCallback.doUpdate(R40000XWIKI6990DataMigration.java:246) at com.xpn.xwiki.store.migration.hibernate.R40000XWIKI6990DataMigration$AbstractUpdateHibernateCallback.doInHibernate(R40000XWIKI6990DataMigration.java:199) at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:820) ... 28 common frames omitted Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:109) at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:200) at org.hibernate.hql.internal.ast.exec.BasicExecutor.doExecute(BasicExecutor.java:80) at org.hibernate.hql.internal.ast.exec.BasicExecutor.execute(BasicExecutor.java:50) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:458) at org.hibernate.engine.query.spi.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:377) at org.hibernate.internal.SessionImpl.executeUpdate(SessionImpl.java:1438) at org.hibernate.query.internal.AbstractProducedQuery.doExecuteUpdate(AbstractProducedQuery.java:1690) at org.hibernate.query.internal.AbstractProducedQuery.executeUpdate(AbstractProducedQuery.java:1672) ... 33 common frames omitted Caused by: org.postgresql.util.PSQLException: ERROR: update or delete on table "xwikiproperties" violates foreign key constraint "fk7f8ab31d231efb9b" on table "xwikiintegers" Detail: Key (xwp_id, xwp_name)=(1695638801, highlight) is still referenced from table "xwikiintegers". at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:130) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197) ... 40 common frames omitted