Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72919

Jenkins 2.450: java.lang.ExceptionInInitializerError

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Trivial Trivial
    • core
    • None

      After updating from 2.449 to 2.450 my instance won't start anymore:

      Container startup failed
      java.lang.ExceptionInInitializerError
              at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:811)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:496)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:465)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:411)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:350)
              at hudson.util.XStream2.<init>(XStream2.java:89)
              at jenkins.model.Jenkins.<clinit>(Jenkins.java:5064)
              at hudson.WebAppMain.installLogger(WebAppMain.java:296)
              at hudson.WebAppMain.contextInitialized(WebAppMain.java:126)
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:800)
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:444)
              at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:294)
              at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1342)
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741)
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:505)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
              at org.eclipse.jetty.server.Server.start(Server.java:387)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
              at org.eclipse.jetty.server.Server.doStart(Server.java:354)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
              at winstone.Launcher.<init>(Launcher.java:152)
              at winstone.Launcher.main(Launcher.java:352)
              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 Main._main(Main.java:264)
              at Main.main(Main.java:112)
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.util.Comparator java.util.TreeMap.comparator accessible: module java.base does not "opens java.util" to unnamed module @ecf9fb3
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
              at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
              at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178)
              at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
              at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:39)
              at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
              ... 33 more

      I'm running the war file on an Ubuntu 22.04 VM in openJDK 17.

          [JENKINS-72919] Jenkins 2.450: java.lang.ExceptionInInitializerError

          Bastian created issue -

          Mark Waite added a comment -

          I can't duplicate the problem based on your list of plugins.  I configured a Jenkins controller with those plugins and Jenkins 2.450 running under Java 17.

          I was surprised by the log output, since it mentions Jetty 9 and Jenkins 2.450 provides Jetty 10, not Jetty 9.

          You'll need to provide more details so that others can duplicate the issue.

          Mark Waite added a comment - I can't duplicate the problem based on your list of plugins.  I configured a Jenkins controller with those plugins and Jenkins 2.450 running under Java 17. I was surprised by the log output, since it mentions Jetty 9 and Jenkins 2.450 provides Jetty 10, not Jetty 9. You'll need to provide more details so that others can duplicate the issue.

          Bastian added a comment - - edited

          Well, I'm sorry. It seems I got bitten by one of the more common mistakes when using version numbers in YAML.

          As I'm using ansible for deploying jenkins I'm using a group variable. What happened is that ansible's (or any parser, really, no mistake on their part) YAML "helpfully" converted the value 2.450 to 2.45, which I did not notice. So actually it was trying to install version 2.45 I have now added quotation which fixes my mistake.

          Sorry for not catching that error on my part and thank you for trying to reproduce this issue!

          Bastian added a comment - - edited Well, I'm sorry. It seems I got bitten by one of the more common mistakes when using version numbers in YAML. As I'm using ansible for deploying jenkins I'm using a group variable. What happened is that ansible's (or any parser, really, no mistake on their part) YAML "helpfully" converted the value 2.450 to 2.45, which I did not notice. So actually it was trying to install version 2.45 I have now added quotation which fixes my mistake. Sorry for not catching that error on my part and thank you for trying to reproduce this issue!
          Bastian made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Closed [ 6 ]
          Mark Waite made changes -
          Priority Original: Blocker [ 1 ] New: Trivial [ 5 ]

            Unassigned Unassigned
            bschain Bastian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: