Details
Description
Attempting to migrate the xwiki postgres docker image from 14.2 -> 14.3 results in the below migration error.
It appears that the migration detects that the table exists within the correct schema `xwikidb`, but when it tries to load all tasks from the table it tries to select from the table in the `public` schema.
Logging into the database and copying the, empty, table with:
create table xwikidocumentindexingqueue as (select * from xwikidb.xwikidocumentindexingqueue)
allows the migration to succeed and xwiki to return to normal functionality.
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 [140200010] while the required version is [140300001]. 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:700) ... 18 common frames omittedCaused 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:357) 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:700) at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:661) at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:838) at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:576) at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:1024) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:395) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2150) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2212) at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1425) at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1392) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1301) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1238) at com.xpn.xwiki.XWiki.<init>(XWiki.java:1211) 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 omittedCaused by: com.xpn.xwiki.store.migration.DataMigrationException: Error while loading the existing tasks. at org.xwiki.index.migration.R140300001XWIKI19571DataMigration.getPreHibernateLiquibaseChangeLog(R140300001XWIKI19571DataMigration.java:111) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.liquibaseUpdate(HibernateDataMigrationManager.java:251) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.liquibaseUpdate(HibernateDataMigrationManager.java:228) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:188) ... 23 common frames omittedCaused by: org.postgresql.util.PSQLException: ERROR: relation "xwikidocumentindexingqueue" does not exist Position: 79 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:473) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:393) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:114) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) at org.apache.commons.dbcp2.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:122) at org.xwiki.index.migration.R140300001XWIKI19571DataMigration.saveTasks(R140300001XWIKI19571DataMigration.java:165) at org.xwiki.index.migration.R140300001XWIKI19571DataMigration.getPreHibernateLiquibaseChangeLog(R140300001XWIKI19571DataMigration.java:102) .. 26 common frames omitted
Attachments
Issue Links
- is duplicated by
-
XWIKI-19679 DefaultTasksManager errors when upgrading XWiki to 14.3 on PostgreSQL
- Closed