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

Cannot invoke "java.util.List.size()" because "<parameter1>" is null

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 15.10.12
    • Extension
    • None
    • Unknown

    Description

      A fresh Xwiki HSQL distribution install in a Jetty docker container log the following stacktrace on every startup:

      2024-10-13 21:54:41,505 [main] INFO  o.x.s.f.i.FilesystemStoreTools - Using filesystem store directory [/var/lib/jetty/xwiki-data/store/file] 
      2024-10-13 21:54:42,164 [main] ERROR h.i.DefaultExtensionJobHistory - Failed to read extension job history from [/var/lib/jetty/xwiki-data/extension/history/2024.10.13.xml]. 
      java.lang.NullPointerException: Cannot invoke "java.util.List.size()" because "<parameter1>" is null
              at java.base/java.util.Collections.reverse(Unknown Source)
              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:550)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:636)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:329)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:320)
              at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:591)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:540)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:636)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:329)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:320)
              at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:178)
              at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:143)
              at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:301)
              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:133)
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1073)
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:572)
              at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:1002)
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:765)
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:379)
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1449)
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1414)
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:916)
              at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:288)
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
              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:517)
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:157)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:173)
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:428)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:66)
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:785)
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:754)
              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:73)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:146)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:252)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
              at org.eclipse.jetty.server.Server.start(Server.java:423)
              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:387)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
              at org.eclipse.jetty.xml.XmlConfiguration.lambda$main$3(XmlConfiguration.java:1931)
              at java.base/java.security.AccessController.doPrivileged(Unknown Source)
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1881)
      

      Besides that, it seems to work fine.

      Docker command:

      docker run \
        --name jetty-xwiki \
        -v /var/lib/jetty/webapps/xwiki:/var/lib/jetty/webapps/xwiki \
        -v /var/lib/jetty/xwiki-data:/var/lib/jetty/xwiki-data \
        -p 127.0.0.1:8080:8080 \
        jetty:9-jre21 -Dxwiki.data.dir=/var/lib/jetty/xwiki-data 
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            GOhrner Gunter Ohrner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: