Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-2083

NullPointerException when serializing a ExtensionAuthor without a name

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 12.10.1, 13.0
    • 12.10
    • Extension
    • None
    • Debian package xwiki-tomcat9-mariadb
    • Unit
    • Unknown
    • N/A
    • N/A

    Description

      After startup of the servlet container when sending the first request to initialize the wiki, the following exception shows up in the log of my production server:

      [2020-11-27 00:15:06] [info] 2020-11-27 00:15:06,298 [extendion.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@6c3afd53([extension, index])] ERROR o.x.e.i.i.j.ExtensionIndexJob  - Exception thrown during job execution
      [2020-11-27 00:15:06] [info] java.lang.NullPointerException: null
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.internal.converter.ExtensionAuthorConverter.toString(ExtensionAuthorConverter.java:152)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.internal.converter.ExtensionAuthorConverter.convertToString(ExtensionAuthorConverter.java:186)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.internal.converter.ExtensionAuthorConverter.convertToString(ExtensionAuthorConverter.java:43)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.properties.converter.AbstractConverter.convert(AbstractConverter.java:46)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.search.solr.internal.DefaultSolrUtils.toString(DefaultSolrUtils.java:416)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.search.solr.internal.DefaultSolrUtils.lambda$setString$2(DefaultSolrUtils.java:396)
      [2020-11-27 00:15:06] [info] #011at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
      [2020-11-27 00:15:06] [info] #011at java.base/java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1085)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.search.solr.internal.DefaultSolrUtils.setString(DefaultSolrUtils.java:396)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.index.internal.ExtensionIndexStore.add(ExtensionIndexStore.java:450)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.index.internal.job.ExtensionIndexJob.addLocalExtensions(ExtensionIndexJob.java:580)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.extension.index.internal.job.ExtensionIndexJob.runInternal(ExtensionIndexJob.java:202)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:243)
      [2020-11-27 00:15:06] [info] #011at org.xwiki.job.AbstractJob.run(AbstractJob.java:220)
      [2020-11-27 00:15:06] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      [2020-11-27 00:15:06] [info] #011at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      [2020-11-27 00:15:06] [info] #011at java.base/java.lang.Thread.run(Thread.java:834)
      

      The link in question is:

      builder.append(value.getName().replace("\\", "\\\\").replace("/", "\\/"));
      

      Obviously value.getName() (or just value) is null here.

      This exception is not reproducible with a vanilla jetty-hsqldb instance so it seems to be caused by some broken extension in my local repository. Me bad! A better error message would be nice, however.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            camil7 Clemens Robbenhaar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: