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

Possible NullPointerException when retrying a failed filesystem migration from 10.11

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      I just upgraded from 10.11 to 11.0 with apt-get upgrade, as always, and after restarting Tomcat, whenever I try to enter a wiki and it starts to init, I get tons of exceptions in the logfile like this:

      2019-01-29 19:58:23,803 [XWiki initialization] INFO .HibernateDataMigrationManager - The following data migration(s) will be applied for wiki [xxxxxx] currently in version [1008010]:
      2019-01-29 19:58:23,803 [XWiki initialization] INFO .HibernateDataMigrationManager - R1100000XWIKI15620 - Move the store to a new location. Change the path from URL encoding to hash based to support long references.
      2019-01-29 19:58:23,803 [XWiki initialization] INFO .HibernateDataMigrationManager - Checking Hibernate mapping and updating schema if needed for wiki [xxxxxx]
      2019-01-29 19:58:24,037 [XWiki initialization] INFO .HibernateDataMigrationManager - Starting data migration [R1100000XWIKI15620] with version [1100000] on database [xxxxxx]
      2019-01-29 19:58:24,051 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xxxxxx]...
      com.xpn.xwiki.store.migration.DataMigrationException: Data migration R1100000XWIKI15620 failed
      at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:120)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:848)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.migrateDatabase(AbstractDataMigrationManager.java:743)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrations(AbstractDataMigrationManager.java:674)
      at com.xpn.xwiki.store.migration.hibernate.HibernateDataMigrationManager.startMigrations(HibernateDataMigrationManager.java:346)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.startMigrationsOnlyOnce(AbstractDataMigrationManager.java:644)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.tryToProcceedToMigration(AbstractDataMigrationManager.java:621)
      at com.xpn.xwiki.store.migration.AbstractDataMigrationManager.checkDatabase(AbstractDataMigrationManager.java:538)
      at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:339)
      at com.xpn.xwiki.internal.store.hibernate.HibernateStore.setWiki(HibernateStore.java:302)
      at com.xpn.xwiki.internal.store.hibernate.HibernateStore.beginTransaction(HibernateStore.java:472)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.beginTransaction(XWikiHibernateBaseStore.java:682)
      at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:894)
      at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:353)
      at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1916)
      at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1978)
      at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1333)
      at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1307)
      at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1225)
      at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1167)
      at com.xpn.xwiki.XWiki.<init>(XWiki.java:1140)
      at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
      at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:236)
      at org.xwiki.job.AbstractJob.run(AbstractJob.java:213)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:927)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1036)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.hibernateMigrate(R1100000XWIKI15620DataMigration.java:121)
      at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:118)
      ... 24 common frames omitted
      Caused by: org.hibernate.HibernateException: Failed to refactor filesystem store paths
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.lambda$hibernateMigrate$0(R1100000XWIKI15620DataMigration.java:125)
      at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:921)
      ... 27 common frames omitted
      Caused by: java.lang.NullPointerException: null
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:105)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11EntityReference(AbstractFileStoreDataMigration.java:108)
      at org.xwiki.store.filesystem.internal.migration.AbstractFileStoreDataMigration.getPre11DocumentReference(AbstractFileStoreDataMigration.java:116)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.migrateDocumentContent(R1100000XWIKI15620DataMigration.java:167)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.migrate(R1100000XWIKI15620DataMigration.java:152)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.migrate(R1100000XWIKI15620DataMigration.java:154)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.migrate(R1100000XWIKI15620DataMigration.java:154)
      at org.xwiki.store.filesystem.internal.migration.R1100000XWIKI15620DataMigration.lambda$hibernateMigrate$0(R1100000XWIKI15620DataMigration.java:123)
      ... 28 common frames omitted

      And, therefore, I cannot enter XWiki.

      I'm on Ubuntu 16.04 with MySQL 5.7 and also using LDAP, I can provide with any other information required.

      See also https://forum.xwiki.org/t/attachment-issues-after-upgrade-from-10-11-to-11-0.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            hector.prieto Héctor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: