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

XWikiHibernateAttachmentStore methods don't take into account attachment wiki as well as they think

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      While upgrading from 6.2.3 to 6.4 I notices the following "error" in the log:

      Failed to load content for attachment [header.png@subwiki » ColorThemes » DefaultColorTheme]. This attachment is broken, please consider re-uploading it. Internal error: Error number 3231 in 3: Exception while loading attachment header.png of document ColorThemes.DefaultColorTheme
      Failed to load content for attachment [logo.png@subwiki » ColorThemes » DefaultColorTheme]. This attachment is broken, please consider re-uploading it. Internal error: Error number 3231 in 3: Exception while loading attachment logo.png of document ColorThemes.DefaultColorTheme
      Failed to load attachments
      class java.lang.RuntimeException: Failed to compare attachments with reference [Attachment subwiki:ColorThemes.DefaultColorTheme@header.png] 
      at com.xpn.xwiki.doc.XWikiDocument.equalsData(XWikiDocument.java:3908)
       at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.onEvent(XarExtensionJobFinishedListener.java:193) 
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304) 
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269) 
      at org.xwiki.job.internal.AbstractJob.jobFinished(AbstractJob.java:260) 
      at org.xwiki.job.internal.AbstractJob.runInContext(AbstractJob.java:214) 
      at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:192) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: class com.xpn.xwiki.XWikiException: Error number 0 in 2: Failed to compare attachments 
      at com.xpn.xwiki.doc.XWikiAttachment.equalsData(XWikiAttachment.java:954) 
      at com.xpn.xwiki.doc.XWikiDocument.equalsData(XWikiDocument.java:3904)
      at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.onEvent(XarExtensionJobFinishedListener.java:193) 
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269) 
      at org.xwiki.job.internal.AbstractJob.jobFinished(AbstractJob.java:260) 
      at org.xwiki.job.internal.AbstractJob.runInContext(AbstractJob.java:214) 
      at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:192) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 
      
      Caused by: class java.lang.NullPointerException: null
      at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:690) 
      at com.xpn.xwiki.doc.XWikiAttachment.equalsData(XWikiAttachment.java:939) 
      at com.xpn.xwiki.doc.XWikiDocument.equalsData(XWikiDocument.java:3904)
      at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.onEvent(XarExtensionJobFinishedListener.java:193)
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:304)
      at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:269) 
      at org.xwiki.job.internal.AbstractJob.jobFinished(AbstractJob.java:260) 
      at org.xwiki.job.internal.AbstractJob.runInContext(AbstractJob.java:214) 
      at org.xwiki.job.internal.AbstractJob.run(AbstractJob.java:192) 
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
      

      I see the page ColorThemes.DefaultColorTheme has been removed (renamed) in 6.4 so I guess that causes the problem.
      (The "to be upgraded" ColorThemes.DefaultColorTheme page in the subwiki had no local modifications, btw.)

      No loss of functionality in any way, but it might make people nervous to get these error messages while upgrading.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              camil7 Clemens Robbenhaar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Date of First Response: