Details
Description
29-Mar-2022 09:10:14.018 INFO [XWiki initialization] liquibase.lockservice.null Successfully released change log lock 2022-03-29 09:10:14,021 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xwiki]... 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: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:1016) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:395) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2137) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2199) at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1412) at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1379) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1288) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1225) at com.xpn.xwiki.XWiki.<init>(XWiki.java:1198) 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) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:825) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:888) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.liquibaseUpdate(HibernateDataMigrationManager.java:289) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:188) ... 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:1109) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:308) at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1125) at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1112) 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:819) ... 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::R140200010::xwiki: Reason: liquibase.exception.DatabaseException: (conn=138247) Table 'xwiki.xwikilinks' doesn't exist [Failed SQL: (1146) alter table xwikilinks MODIFY XWL_LINK varchar(768)] 29-Mar-2022 09:10:14.018 INFO [XWiki initialization] liquibase.lockservice.null Successfully released change log lock 2022-03-29 09:10:14,021 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xwiki]... 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: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:1016) at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:395) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2137) at com.xpn.xwiki.XWiki.getDocument(XWiki.java:2199) at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1412) at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1379) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1288) at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1225) at com.xpn.xwiki.XWiki.<init>(XWiki.java:1198) 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) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:825) at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:888) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.liquibaseUpdate(HibernateDataMigrationManager.java:289) at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.updateSchema(HibernateDataMigrationManager.java:188) ... 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:1109) at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.coordinateWork(JdbcCoordinatorImpl.java:308) at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1125) at org.hibernate.internal.AbstractSharedSessionContract.doWork(AbstractSharedSessionContract.java:1112) 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:819) ... 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::R140200010::xwiki:
A possible workaround is to delete the xwikilink table before the migrations are executed.