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

Problem after Upgrading to Java 17 on Windows Jenkins 2.462.3

XMLWordPrintable

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

      I'm using Jenkins 2.462.3 LTS with Java 11 (jre-11.0.15.10-hotspot) , it was working fine with Java 11 but now i tried to to upgrade Java to 17 (jre-17.0.13.11-hotspot).

      I see following log during startup.

      06-Nov-2024 10:45:54.559 WARNING [Jenkins initialization thread] hudson.plugins.gradle.injection.DevelocityComputerListener.onOnline Invocation of onOnline failed for 
      	java.lang.NullPointerException
      		at java.base/java.util.TreeMap.putAll(Unknown Source)
      		at hudson.slaves.EnvironmentVariablesNodeProperty.buildEnvVars(EnvironmentVariablesNodeProperty.java:87)
      		at hudson.model.Computer.buildEnvironment(Computer.java:1221)
      		at PluginClassLoader for gradle//hudson.plugins.gradle.injection.DevelocityComputerListener.onOnline(DevelocityComputerListener.java:58)
      		at jenkins.model.Jenkins.<init>(Jenkins.java:1036)
      		at hudson.model.Hudson.<init>(Hudson.java:86)
      		at hudson.model.Hudson.<init>(Hudson.java:82)
      		at hudson.WebAppMain$3.run(WebAppMain.java:248)
      

      and also a other example log entry

      06-Nov-2024 10:46:00.291 SEVERE [SCM polling for hudson.maven.MavenModuleSet@2582d5d[DVTDeprecation]] hudson.triggers.SCMTrigger$Runner.runPolling Failed to record SCM polling for hudson.maven.MavenModuleSet@435d6add[DVTAwpSecurityClient]
      	java.lang.NullPointerException
      		at java.base/java.util.TreeMap.putAll(Unknown Source)
      		at hudson.slaves.EnvironmentVariablesNodeProperty.buildEnvVars(EnvironmentVariablesNodeProperty.java:87)
      		at hudson.model.Computer.buildEnvironment(Computer.java:1221)
      		at hudson.model.Job.getEnvironment(Job.java:393)
      		at hudson.model.AbstractProject.getEnvironment(AbstractProject.java:335)
      		at PluginClassLoader for subversion//hudson.scm.SubversionSCM.compareRemoteRevisionWith(SubversionSCM.java:1489)
      		at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:419)
      		at hudson.scm.SCM.poll(SCM.java:436)
      		at hudson.model.AbstractProject._poll(AbstractProject.java:1426)
      		at hudson.model.AbstractProject.poll(AbstractProject.java:1332)
      		at jenkins.triggers.SCMTriggerItem$SCMTriggerItems$Bridge.poll(SCMTriggerItem.java:151)
      		at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:617)
      		at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:664)
      		at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:123)
      		at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      		at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
      		at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      		at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      		at java.base/java.lang.Thread.run(Unknown Source)
      

      I have compared the config.xml after starting with Java 17 and it has changed massive !
      All View definitions have changed.
      Before

      <listView>
            <owner class="hudson" reference="../../.."/>
            <name>Anwendungstests</name>
            <description>Hier werden alle Jobs gelistet, die nächtlich Tests ausführen.</description>
            <filterExecutors>false</filterExecutors>
            <filterQueue>false</filterQueue>
            <properties class="hudson.model.View$PropertyList"/>
            <jobNames>
              <comparator class="hudson.util.CaseInsensitiveComparator" reference="../../../listView/jobNames/comparator"/>
              <string>AmfTest</string>
              <string>FaiTest</string>
              <string>FormsGuiTest</string>
              <string>GemTest</string>
              <string>LwfTest</string>
              <string>TourTest</string>
              <string>WahlenTest</string>
            </jobNames>
            <jobFilters/>
            <columns>
              <hudson.views.StatusColumn/>
              <hudson.views.WeatherColumn/>
              <hudson.views.JobColumn/>
              <hudson.views.LastSuccessColumn/>
              <hudson.views.LastFailureColumn/>
              <hudson.views.LastDurationColumn/>
              <hudson.views.BuildButtonColumn/>
            </columns>
            <recurse>false</recurse>
          </listView>
      

      With Java 17

      <listView>
            <owner class="hudson" reference="../../.."/>
            <name>Anwendungstests</name>
            <description>Hier werden alle Jobs gelistet, die nächtlich Tests ausführen.</description>
            <filterExecutors>false</filterExecutors>
            <filterQueue>false</filterQueue>
            <properties class="hudson.model.View$PropertyList"/>
            <jobNames>
              <comparator class="java.lang.String$CaseInsensitiveComparator" reference="../../../listView/jobNames/comparator"/>
            </jobNames>
            <jobFilters/>
            <columns>
              <hudson.views.StatusColumn/>
              <hudson.views.WeatherColumn/>
              <hudson.views.JobColumn/>
              <hudson.views.LastSuccessColumn/>
              <hudson.views.LastFailureColumn/>
              <hudson.views.LastDurationColumn/>
              <hudson.views.BuildButtonColumn/>
            </columns>
            <recurse>false</recurse>
          </listView>
      

      The nodeProperties have also changed.
      Example Before

      <nodeProperties>
      <hudson.slaves.EnvironmentVariablesNodeProperty>
            <envVars serialization="custom">
              <unserializable-parents/>
              <tree-map>
                <default>
                  <comparator class="java.lang.String$CaseInsensitiveComparator" reference="../../../../../../views/listView[12]/jobNames/comparator"/>
                </default>
                <int>1</int>
                <string>MAVEN_OPTS</string>
                <string></string>
              </tree-map>
            </envVars>
          </hudson.slaves.EnvironmentVariablesNodeProperty>
      ...
      

      With Java 17

      <nodeProperties>
       <hudson.slaves.EnvironmentVariablesNodeProperty/>
       <hudson.slaves.EnvironmentVariablesNodeProperty/>
       and so on ...
      

      I don't know what i make wrong here. I must update to Java 17 because the latest LTS Version only supports Java 17.

      Any help appreciated.

            Unassigned Unassigned
            c_koell Claus Köll
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: