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

Content sometimes fails to be imported with tasks in tables

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 9.25.0
    • None
    • None
    • Unknown

    Description

      This issue has been reported by a user of the confluence migrator running XWiki 14.10.16 and 9.23.0.

      When performing the import, one of the page fails to be imported, with the following stack-trace :

      Failed to convert content of the page with id [{pageId=XXXXXXXXX, pageTitle='XXXXXXXXXX', parentTitle='null', spaceTitle='XXXXXXXXX', pageRevision='1'}]. Cause: [NullPointerException: ].
      class org.xwiki.filter.FilterException: Failed to parse Confluence XHTML content
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:117)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:47)
          at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.parse(ConfluenceInputFilterStream.java:1000)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.convertToXWiki21(ConfluenceInputFilterStream.java:969)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:718)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:635)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:528)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:234)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:157)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:89)
          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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: class org.xwiki.rendering.parser.ParseException: Failed to parse input source
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:147)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLParser.parse(ConfluenceXHTMLParser.java:265)
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:121)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:115)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:47)
          at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.parse(ConfluenceInputFilterStream.java:1000)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.convertToXWiki21(ConfluenceInputFilterStream.java:969)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:718)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:635)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:528)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:234)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:157)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:89)
          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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: class org.xwiki.rendering.wikimodel.WikiParserException: java.lang.NullPointerException
          at org.xwiki.rendering.wikimodel.xhtml.XhtmlParser.parse(XhtmlParser.java:136)
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:141)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLParser.parse(ConfluenceXHTMLParser.java:265)
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:121)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:115)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:47)
          at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.parse(ConfluenceInputFilterStream.java:1000)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.convertToXWiki21(ConfluenceInputFilterStream.java:969)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:718)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:635)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:528)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:234)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:157)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:89)
          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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      Caused by: class java.lang.NullPointerException: null
          at org.xwiki.rendering.internal.renderer.xwiki20.XWikiSyntaxChainingRenderer.onNewLine(XWikiSyntaxChainingRenderer.java:350)
          at org.xwiki.rendering.listener.chaining.AbstractChainingListener.onNewLine(AbstractChainingListener.java:626)
          at org.xwiki.rendering.listener.chaining.ConsecutiveNewLineStateChainingListener.onNewLine(ConsecutiveNewLineStateChainingListener.java:280)
          at org.xwiki.rendering.listener.chaining.AbstractChainingListener.onNewLine(AbstractChainingListener.java:626)
          at org.xwiki.rendering.listener.chaining.BlockStateChainingListener.onNewLine(BlockStateChainingListener.java:885)
          at org.xwiki.rendering.listener.chaining.AbstractChainingListener.onNewLine(AbstractChainingListener.java:626)
          at org.xwiki.rendering.listener.chaining.EventType$47.fireEvent(EventType.java:598)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.fireEvent(LookaheadChainingListener.java:551)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.flush(LookaheadChainingListener.java:544)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.beginDocument(LookaheadChainingListener.java:117)
          at org.xwiki.rendering.listener.chaining.EventType$1.fireEvent(EventType.java:47)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.fireEvent(LookaheadChainingListener.java:551)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.flush(LookaheadChainingListener.java:544)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.beginDocument(LookaheadChainingListener.java:117)
          at org.xwiki.rendering.listener.chaining.EventType$1.fireEvent(EventType.java:47)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.fireEvent(LookaheadChainingListener.java:551)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.flush(LookaheadChainingListener.java:544)
          at org.xwiki.rendering.listener.chaining.LookaheadChainingListener.beginDocument(LookaheadChainingListener.java:117)
          at org.xwiki.rendering.listener.chaining.AbstractChainingListener.beginDocument(AbstractChainingListener.java:167)
          at org.xwiki.rendering.listener.WrappingListener.beginDocument(WrappingListener.java:59)
          at org.xwiki.rendering.block.XDOM.before(XDOM.java:110)
          at org.xwiki.rendering.block.AbstractBlock.traverse(AbstractBlock.java:539)
          at com.xwiki.task.internal.TaskListMacroConverter.toXWiki(TaskListMacroConverter.java:75)
          at org.xwiki.contrib.confluence.filter.internal.macros.DefaultMacroConverter.toXWiki(DefaultMacroConverter.java:70)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceConverterListener.onMacro(ConfluenceConverterListener.java:113)
          at org.xwiki.rendering.internal.parser.wikimodel.DefaultXWikiGeneratorListener.onMacroBlock(DefaultXWikiGeneratorListener.java:825)
          at org.xwiki.rendering.wikimodel.impl.InternalWikiScannerContext.checkMacro(InternalWikiScannerContext.java:559)
          at org.xwiki.rendering.wikimodel.impl.InternalWikiScannerContext.closeBlock(InternalWikiScannerContext.java:630)
          at org.xwiki.rendering.wikimodel.impl.InternalWikiScannerContext.checkBlockContainer(InternalWikiScannerContext.java:539)
          at org.xwiki.rendering.wikimodel.impl.WikiScannerContext.pushContext(WikiScannerContext.java:700)
          at org.xwiki.rendering.wikimodel.impl.WikiScannerContext.beginDocument(WikiScannerContext.java:155)
          at org.xwiki.rendering.wikimodel.xhtml.handler.TagHandler.beginDocument(TagHandler.java:148)
          at org.xwiki.rendering.wikimodel.xhtml.handler.BlockTagHandler.begin(BlockTagHandler.java:58)
          at org.xwiki.rendering.wikimodel.xhtml.handler.DivisionTagHandler.begin(DivisionTagHandler.java:60)
          at org.xwiki.rendering.wikimodel.xhtml.handler.TagHandler.beginElement(TagHandler.java:67)
          at org.xwiki.rendering.wikimodel.xhtml.impl.TagContext.beginElement(TagContext.java:74)
          at org.xwiki.rendering.wikimodel.xhtml.impl.TagStack.beginElement(TagStack.java:114)
          at org.xwiki.rendering.wikimodel.xhtml.impl.XhtmlHandler.startElement(XhtmlHandler.java:222)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
          at org.xwiki.rendering.wikimodel.xhtml.filter.XHTMLWhitespaceXMLFilter.startElement(XHTMLWhitespaceXMLFilter.java:156)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.wikimodel.ConfluenceXHTMLWhitespaceXMLFilter.startElement(ConfluenceXHTMLWhitespaceXMLFilter.java:77)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
          at org.xwiki.rendering.wikimodel.xhtml.filter.AccumulationXMLFilter.startElement(AccumulationXMLFilter.java:74)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
          at org.xwiki.rendering.wikimodel.xhtml.filter.DTDXMLFilter.startElement(DTDXMLFilter.java:73)
          at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
          at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
          at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
          at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
          at org.xwiki.rendering.wikimodel.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:58)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
          at org.xwiki.rendering.wikimodel.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:58)
          at java.xml/org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
          at org.xwiki.rendering.wikimodel.xhtml.filter.DefaultXMLFilter.parse(DefaultXMLFilter.java:58)
          at org.xwiki.rendering.wikimodel.xhtml.XhtmlParser.parse(XhtmlParser.java:134)
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:141)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLParser.parse(ConfluenceXHTMLParser.java:265)
          at org.xwiki.rendering.internal.parser.wikimodel.AbstractWikiModelParser.parse(AbstractWikiModelParser.java:121)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:115)
          at org.xwiki.contrib.confluence.parser.xhtml.internal.ConfluenceXHTMLInputFilterStream.read(ConfluenceXHTMLInputFilterStream.java:47)
          at org.xwiki.filter.input.AbstractBeanInputFilterStream.read(AbstractBeanInputFilterStream.java:79)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.parse(ConfluenceInputFilterStream.java:1000)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.convertToXWiki21(ConfluenceInputFilterStream.java:969)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:718)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPageRevision(ConfluenceInputFilterStream.java:635)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readPage(ConfluenceInputFilterStream.java:528)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.readInternal(ConfluenceInputFilterStream.java:234)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:157)
          at org.xwiki.contrib.confluence.filter.internal.input.ConfluenceInputFilterStream.read(ConfluenceInputFilterStream.java:89)
          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 java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
          at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
          at java.base/java.lang.Thread.run(Thread.java:829)
      

      Looking at the content of the page, it turns out that the import issue appears when this content is present in a migrated page :

      <table class="wrapped relative-table" style="width: 96.4583%;"><tbody><tr><td colspan="1"><div class="content-wrapper"><p><br /></p><p><br /></p><p>&bull; Some paragraph content</p><p>&bull; Some other paragraph content</p><p>&bull; Some other paragraph content</p><p><br /></p><p>&bull; Some other paragraph content</p><ac:task-list>
      <ac:task>
      <ac:task-id>96</ac:task-id>
      <ac:task-status>incomplete</ac:task-status>
      <ac:task-body><span><ac:link><ri:user ri:userkey="xxxxxxxxxxxxx" /></ac:link><span> some text related to the task</span><br /></span></ac:task-body>
      </ac:task>
      </ac:task-list></div></td></tr></tbody></table>
      

      tcaras managed to reduce the size of the content above to some minimal version, that triggers the same issue :

      <table><p><br /></p><ac:task-list></ac:task-list></table>
      

      When this issue occurs, the page content is not converted and thus the migrated page in XWiki is blank.

      With a little bit of diagnosis, it turns out that https://github.com/xwiki/xwiki-rendering/blob/5d30ae5796bbb133ac3a8ddb7c24886930fc6dd9/xwiki-rendering-syntaxes/xwiki-rendering-syntax-xwiki20/src/main/java/org/xwiki/rendering/internal/renderer/xwiki20/XWikiSyntaxChainingRenderer.java#L350C9-L350C9 will throw an NPE because, in these cases, getXWikiSyntaxListenerChain().getLookaheadChainingListener().getNextEvent() will return null.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            caubin Clément Aubin
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: