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

NPEs related to user mentions in console when upgrading XWiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.6
    • 12.5.1
    • Mentions
    • None
    • Windows 10 Pro 64 bit, Firefox 78, using a local instance of XWiki 12.5.1 on MySQL 8, PostgreSQL 12, Tomcat 9.0.36
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Create an older instance of XWiki (e.g. 8.4.6 or 11.10.5) with a subwiki
      2. Create a global user on Main Wiki
      3. Create also a local user on subwiki
      4. Close the instance
      5. Go to the newer instance (e.g. 12.5.1) and copy/cut the
        [...]webapps\xwiki

        folder and replace it (first delete the old one) in the same location on the older version

      1. Start XWiki and follow DW to the end
      2. Run also the DW for the subwiki

      EXPECTED RESULTS

      No warnings/errors are displayed.

      ACTUAL RESULTS

      After DW completes (both for Main Wiki as well as for subwiki), there are many NPE errors in console related to user mentions. Stacktrace:

      2020-07-09 12:51:11,771 [org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob@75ebe623(null)] ERROR o.x.m.i.a.j.MentionsUpdateJob  - Exception thrown during job execution
      java.lang.NullPointerException: null
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$null$0(MentionsUpdateJob.java:101)
              at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
              at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
              at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
              at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
              at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:548)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$handBaseObject$1(MentionsUpdateJob.java:101)
              at java.base/java.util.Optional.flatMap(Optional.java:294)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.handBaseObject(MentionsUpdateJob.java:100)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.runInternal(MentionsUpdateJob.java:92)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:240)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:217)
              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)
      Cleaning up unclosed ZipFile for archive C:\ILIE LUCRU\TOMCAT_HOME 9.0.36 - 11.10.5 MySQL\work\Catalina\localhost\xwiki\extension\repository\org%2Exwiki%2Eplatform%3Axwiki-platform-distribution-flavor-wiki\11%2E10%2E5\org%2Exwiki%2Eplatform%3Axwiki-platform-distribution-flavor-wiki-11%2E10%2E5.xar
      2020-07-09 12:51:13,799 [org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob@11536413(null)] ERROR o.x.m.i.a.j.MentionsUpdateJob  - Exception thrown during job execution
      java.lang.NullPointerException: null
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$null$0(MentionsUpdateJob.java:101)
              at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
              at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
              at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
              at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
              at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:548)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$handBaseObject$1(MentionsUpdateJob.java:101)
              at java.base/java.util.Optional.flatMap(Optional.java:294)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.handBaseObject(MentionsUpdateJob.java:100)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.runInternal(MentionsUpdateJob.java:92)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:240)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:217)
              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)
      2020-07-09 12:51:18,333 [org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob@27a3ee15(null)] ERROR o.x.m.i.a.j.MentionsUpdateJob  - Exception thrown during job execution
      java.lang.NullPointerException: null
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$null$0(MentionsUpdateJob.java:101)
              at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
              at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
              at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
              at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
              at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:548)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$handBaseObject$1(MentionsUpdateJob.java:101)
              at java.base/java.util.Optional.flatMap(Optional.java:294)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.handBaseObject(MentionsUpdateJob.java:100)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.runInternal(MentionsUpdateJob.java:92)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:240)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:217)
              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)
      2020-07-09 12:51:20,016 [org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob@8cfe4cf(null)] ERROR o.x.m.i.a.j.MentionsUpdateJob  - Exception thrown during job execution
      java.lang.NullPointerException: null
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$null$0(MentionsUpdateJob.java:101)
              at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
              at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1631)
              at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
              at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
              at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
              at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
              at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
              at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.base/java.util.stream.ReferencePipeline.findAny(ReferencePipeline.java:548)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.lambda$handBaseObject$1(MentionsUpdateJob.java:101)
              at java.base/java.util.Optional.flatMap(Optional.java:294)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.handBaseObject(MentionsUpdateJob.java:100)
              at org.xwiki.mentions.internal.async.jobs.MentionsUpdateJob.runInternal(MentionsUpdateJob.java:92)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:240)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:217)
              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)

      Attachments

        Issue Links

          Activity

            People

              surli Simon Urli
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: