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

Nullpointerexception when migrating deleted filesystem attachments in 9.10 on Windows

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      2017-11-24 09:11:44,461 [XWiki initialization] INFO  .HibernateDataMigrationManager - Starting data migration [R910010XWIKI9065] with version [910010] on database [xwiki] 
      2017-11-24 09:11:44,477 [XWiki initialization] INFO  .R910010XWIKI9065DataMigration - Migrating filesystem attachment metadatas storded in [\opt\tomcat7\data\storage] 
      2017-11-24 09:11:44,492 [XWiki initialization] INFO  .R910010XWIKI9065DataMigration - Storing attachment metadata [C:\opt\tomcat7\data\storage\xwiki\Main\Employee+Terminate+Procedure\~this\deleted-attachments\Contact+Supervisor.docx-1488383629338] in the database 
      2017-11-24 09:11:44,492 [XWiki initialization] ERROR .HibernateDataMigrationManager - Failed to migrate database [xwiki]... 
      com.xpn.xwiki.store.migration.DataMigrationException: Data migration R910010XWIKI9065 failed
      	at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:114)
      	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:664)
      	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:669)
      	at com.xpn.xwiki.store.XWikiHibernateStore.loadXWikiDoc(XWikiHibernateStore.java:880)
      	at com.xpn.xwiki.store.XWikiCacheStore.loadXWikiDoc(XWikiCacheStore.java:280)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1842)
      	at com.xpn.xwiki.XWiki.getDocument(XWiki.java:1902)
      	at com.xpn.xwiki.XWiki.initializeMandatoryDocument(XWiki.java:1272)
      	at com.xpn.xwiki.XWiki.initializeMandatoryDocuments(XWiki.java:1246)
      	at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1185)
      	at com.xpn.xwiki.XWiki.initXWiki(XWiki.java:1099)
      	at com.xpn.xwiki.XWiki.<init>(XWiki.java:1072)
      	at com.xpn.xwiki.internal.XWikiInitializerJob.runInternal(XWikiInitializerJob.java:117)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:206)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:189)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:910)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeWrite(XWikiHibernateBaseStore.java:1017)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.hibernateMigrate(R910010XWIKI9065DataMigration.java:109)
      	at com.xpn.xwiki.store.migration.hibernate.AbstractHibernateDataMigration.migrate(AbstractHibernateDataMigration.java:112)
      	... 24 common frames omitted
      Caused by: org.hibernate.HibernateException: Failed to move deleted attachments metadata to the database
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration$1.doInHibernate(R910010XWIKI9065DataMigration.java:117)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration$1.doInHibernate(R910010XWIKI9065DataMigration.java:110)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:904)
      	... 27 common frames omitted
      Caused by: java.lang.NullPointerException: null
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:217)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getEntityReference(R910010XWIKI9065DataMigration.java:220)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.getDocumentReference(R910010XWIKI9065DataMigration.java:206)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.storeDeletedAttachment(R910010XWIKI9065DataMigration.java:182)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.migrateMetadatas(R910010XWIKI9065DataMigration.java:170)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration.access$000(R910010XWIKI9065DataMigration.java:77)
      	at org.xwiki.store.filesystem.internal.migration.R910010XWIKI9065DataMigration$1.doInHibernate(R910010XWIKI9065DataMigration.java:115)
      	... 29 common frames omitted
      

      The migrator is getting lost between the configured path and the one found in the index file.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            tmortagne Thomas Mortagne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: