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

NPE in console when restarting XWiki after installing an extension on JAVA 17, Jetty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.4.3, 13.7, 13.8, 12.10.10
    • None
    • Windows 10 Pro 64 bit, Edge 94, using a local instance XWiki 13.7, 13.8, 12.10.10 and 13.4.3 on Jetty/HSQL, Java 17 build 17+35-LTS-2724 from Oracle
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Start XWiki (Jetty/HSQLDB) on Java 17
      2. Login as Admin
      3. Go to Extension Manager and install an extension (e.g. Admin Tools or FAQ)
      4. Close and restart XWiki instance

      EXPECTED RESULTS

      The instance is restarted without any warnings/errors.

      ACTUAL RESULTS

      In console, when the server is starting, there is the following error:

      2021-10-11 14:30:21,620 [main] ERROR h.i.DefaultExtensionJobHistory - Failed to read extension job history from [C:\ILIE LUCRU\XWIKI 13.8\xwiki-platform-distribution-flavor-jetty-hsqldb-13.8 STD\data\extension\history\2021.10.11.xml].
      java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "list" is null
              at java.base/java.util.Collections.reverse(Collections.java:379)
              at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.load(DefaultExtensionJobHistory.java:176)
              at org.xwiki.extension.job.history.internal.DefaultExtensionJobHistory.initialize(DefaultExtensionJobHistory.java:112)
              at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
              at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:242)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
              at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:166)
              at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:132)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:283)
              at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
              at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
              at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1002)
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:553)
              at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:931)
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:764)
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:360)
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1445)
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1409)
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:844)
              at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:275)
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:188)
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:513)
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:154)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:173)
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:447)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:66)
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:784)
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:753)
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:641)
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:540)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:146)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:599)
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:249)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
              at org.eclipse.jetty.server.Server.start(Server.java:408)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:97)
              at org.eclipse.jetty.server.Server.doStart(Server.java:372)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72)
              at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$1(XmlConfiguration.java:1929)
              at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1878)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:218)
              at org.eclipse.jetty.start.Main.start(Main.java:491)
              at org.eclipse.jetty.start.Main.main(Main.java:77)

      It seems I could reproduce the issue only on Jetty and it doesn't reproduce on JAVA 11.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: