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

NPE Error when installing an authenticator which register itself on XWiki 15.3+

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      You can end up with an error like

      2023-09-13 15:40:03,712 [extension/wiki:xwiki job group daemon thread - org.xwiki.extension.job.internal.InstallJob@7bcc3a81([extension, action, com.xwiki.activedirectory:application-activedirectory-ui, wiki:xwiki])] ERROR .o.i.DefaultObservationManager - Failed to send event [org.xwiki.job.event.JobFinishedEvent@3692ce61] to listener [com.xpn.xwiki.XWiki@714162c1]
      java.lang.NullPointerException: Cannot invoke "java.lang.Class.getName()" because "authClass" is null
              at com.xpn.xwiki.XWiki.onJobFinished(XWiki.java:7905)
              at com.xpn.xwiki.XWiki.onEvent(XWiki.java:7862)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:338)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:303)
              at org.xwiki.job.AbstractJob.jobFinished(AbstractJob.java:338)
              at org.xwiki.extension.job.internal.AbstractExtensionJob.jobFinished(AbstractExtensionJob.java:134)
              at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:251)
              at org.xwiki.job.AbstractJob.run(AbstractJob.java:223)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
              at java.base/java.lang.Thread.run(Thread.java:833)
      

      The problem is that XWiki#onJobFinished assume XWiki#getAuthServiceClass() never returns null, but XWIKI-20548 changed that.

      The workaround is to set "com.xpn.xwiki.user.impl.xwiki.XWikiAuthServiceImpl" in xwiki.cfg xwiki.authentication.authclass property.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: