Uploaded image for project: 'Confluence'
  1. Confluence
  2. CONFLUENCE-247

Don't completely fail when unable to determine parent object type

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 9.47.2
    • 9.47.1
    • XML
    • None
    • Unknown

    Description

      We got the following trace. We shouldn't completely fail and let the package import keep going. Instead, we should complain loudly (that's indeed a clue that we don't support something, and that something might be critical... or not).
      We also need to know the object type that's failing so we can further improve the code and handle this type, so let's add the information to the error message. We will also print the id of the related object so we can ask crafty user extracts of their entitites.xml fails if they don't want to send the whole thing for privacy reasons.

      org.xwiki.filter.FilterException: Failed to read package
      	at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:319)
      	at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:198)
      	at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:100)
      	at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
      	at org.xwiki.filter.internal.job.FilterStreamConverterJob.runInternal(FilterStreamConverterJob.java:97)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
      	at org.xwiki.filter.script.internal.ScriptFilterStreamConverterJob.run(ScriptFilterStreamConverterJob.java:75)
      	at com.xwiki.confluencepro.internal.ConfluenceMigrationJob.runInternal(ConfluenceMigrationJob.java:165)
      	at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:246)
      	at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at java.base/java.lang.Thread.run(Unknown Source)
      Caused by: org.xwiki.filter.FilterException: Failed to analyze the package index
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.read(ConfluenceXMLPackage.java:846)
      	at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:310)
      	... 13 more
      Caused by: org.xwiki.filter.FilterException: Unexpected object type. This is a bug in confluence-xml, please report.
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.getObjectByType(ConfluenceXMLPackage.java:1464)
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.readBodyContentObject(ConfluenceXMLPackage.java:1579)
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.readObject(ConfluenceXMLPackage.java:1327)
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.createTree(ConfluenceXMLPackage.java:1260)
      	at org.xwiki.contrib.confluence.filter.input.ConfluenceXMLPackage.read(ConfluenceXMLPackage.java:844)
      	... 14 more
      

      Attachments

        Activity

          People

            rjakse Raphaël Jakse
            rjakse Raphaël Jakse
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: