Uploaded image for project: 'MediaWiki tools'
  1. MediaWiki tools
  2. MEDIAWIKI-122

NPE upon AbstractEntityOutputFilterStream

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Major
    • None
    • 1.13.5
    • Filter
    • None
    • Unknown

    Description

      Note : I'm not sure how to qualify this issue at the moment, it may be more suitable to have in the XWIKI project rather than in MEDIAWIKI.

      Upon the import of a MediaWiki XML dump, I get the following error towards 2/3 of the import :

      Exception thrown during job execution
      class org.xwiki.filter.FilterException: Failed to parse XML
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.read(MediaWikiInputFilterStream.java:362)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.read(MediaWikiInputFilterStream.java:87)
          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:834)
      Caused by: class java.lang.NullPointerException: null
          at com.xpn.xwiki.internal.filter.output.AbstractEntityOutputFilterStream.endWikiSpace(AbstractEntityOutputFilterStream.java:348)
          at com.xpn.xwiki.internal.filter.XWikiDocumentFilterCollection.endWikiSpace(XWikiDocumentFilterCollection.java:75)
          at jdk.internal.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
          at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
          at com.sun.proxy.$Proxy162.endWikiSpace(Unknown Source)
          at jdk.internal.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
          at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
          at com.sun.proxy.$Proxy163.endWikiSpace(Unknown Source)
          at jdk.internal.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
          at org.xwiki.filter.internal.CompositeFilter.invoke(CompositeFilter.java:75)
          at com.sun.proxy.$Proxy164.endWikiSpace(Unknown Source)
          at jdk.internal.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:566)
          at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:90)
          at org.xwiki.filter.internal.FilterProxy.invoke(FilterProxy.java:63)
          at com.sun.proxy.$Proxy165.endWikiSpace(Unknown Source)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.sendEndParents(MediaWikiInputFilterStream.java:558)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.sendSpaceEvents(MediaWikiInputFilterStream.java:526)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.readMediaWiki(MediaWikiInputFilterStream.java:412)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.read(MediaWikiInputFilterStream.java:391)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.read(MediaWikiInputFilterStream.java:360)
          at org.xwiki.contrib.mediawiki.xml.internal.input.MediaWikiInputFilterStream.read(MediaWikiInputFilterStream.java:87)
          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:834)
      

      I'm currently importing the XML dump of a large MediaWiki instance. This dump aims to be imported within a space in my wiki (let's call it ImportSpace). As such, I believe that every imported page should be in this ImportSpace.

      However, during the import process, it seems that the MediaWiki input filter will go one space too high when parsing the XML : during the export, some MediaWiki pages start to appear under the root of the wiki, rather than within ImportSpace.

      Attachments

        Activity

          People

            caubin Clément Aubin
            caubin Clément Aubin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: