After upgrading to 2.476 or 2.477 Jenkins does not start anymore

After upgrading to 2.476 and 2.477 Jenkins does not start anymore. 2.475 still works. It’s installed as part of a tomcat9 service.

Is there any explanation and advice how to solve this?

Thanks in advance.
Axel

Here is the catalina.out:

[2024-09-19 11:42:22] [info] NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[2024-09-19 11:42:22] [info] WARNING: Using incubator modules: jdk.incubator.vector, jdk.incubator.foreign
[2024-09-19 11:42:23] [info] Server version name:   Apache Tomcat/9.0.31 (Ubuntu)
[2024-09-19 11:42:23] [info] Server built:          Jul 29 2024 17:43:06 UTC
[2024-09-19 11:42:23] [info] Server version number: 9.0.31.0
[2024-09-19 11:42:23] [info] OS Name:               Linux
[2024-09-19 11:42:23] [info] OS Version:            5.4.0-196-generic
[2024-09-19 11:42:23] [info] Architecture:          amd64
[2024-09-19 11:42:23] [info] Java Home:             /usr/lib/jvm/java-17-openjdk-amd64
[2024-09-19 11:42:23] [info] JVM Version:           17.0.12+7-Ubuntu-1ubuntu220.04
[2024-09-19 11:42:23] [info] JVM Vendor:            Ubuntu
[2024-09-19 11:42:23] [info] CATALINA_BASE:         /var/lib/tomcat9
[2024-09-19 11:42:23] [info] CATALINA_HOME:         /usr/share/tomcat9
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
[2024-09-19 11:42:23] [info] Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2024-09-19 11:42:23] [info] Command line argument: --add-modules=ALL-SYSTEM
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.time=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.util.regex=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.util.zip=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.lang.reflect=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.desktop/java.awt.font=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: --add-opens=java.base/java.text=ALL-UNNAMED
[2024-09-19 11:42:23] [info] Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
[2024-09-19 11:42:23] [info] Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
[2024-09-19 11:42:23] [info] Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
[2024-09-19 11:42:23] [info] Command line argument: -DJENKINS_HOME=/usr/share/jenkins/.jenkins
[2024-09-19 11:42:23] [info] Command line argument: -Xms512m
[2024-09-19 11:42:23] [info] Command line argument: -Xmx16g
[2024-09-19 11:42:23] [info] Command line argument: -Dmail.smtp.starttls.enable=true
[2024-09-19 11:42:23] [info] Command line argument: -Dcom.sun.jndi.ldap.read.timeout=10000
[2024-09-19 11:42:23] [info] Command line argument: -Dignore.endorsed.dirs=
[2024-09-19 11:42:23] [info] Command line argument: -Dcatalina.base=/var/lib/tomcat9
[2024-09-19 11:42:23] [info] Command line argument: -Dcatalina.home=/usr/share/tomcat9
[2024-09-19 11:42:23] [info] Command line argument: -Djava.io.tmpdir=/tmp
[2024-09-19 11:42:23] [info] Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.6.5].
[2024-09-19 11:42:23] [info] APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
[2024-09-19 11:42:23] [info] APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
[2024-09-19 11:42:23] [info] OpenSSL successfully initialized [OpenSSL 1.1.1f  31 Mar 2020]
[2024-09-19 11:42:23] [info] Initializing ProtocolHandler ["ajp-nio-0:0:0:0:0:0:0:1-8009"]
[2024-09-19 11:42:23] [info] Server initialization in [1,201] milliseconds
[2024-09-19 11:42:24] [info] Starting service [Catalina]
[2024-09-19 11:42:24] [info] Starting Servlet engine: [Apache Tomcat/9.0.31 (Ubuntu)]
[2024-09-19 11:42:24] [info] Deploying web application archive [/var/lib/tomcat9/webapps/ROOT.war]
[2024-09-19 11:42:24] [info] An expanded directory [/var/lib/tomcat9/webapps/ROOT] was found with a last modified time that did not match the associated WAR. It will be deleted.
[2024-09-19 11:42:25] [warning] Unknown version string [5.0]. Default version will be used.

[2024-09-19 11:42:33] [info] At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2024-09-19 11:42:33] [crit] One or more listeners failed to start. Full details will be found in the appropriate container log file
[2024-09-19 11:42:33] [crit] Exception loading sessions from persistent storage
[2024-09-19 11:42:33] [crit] java.io.InvalidClassException: org.springframework.security.core.context.SecurityContextImpl; local class incompatible: stream classdesc serialVersionUID = 580, local class serialVersionUID = 620
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:597)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2051)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1898)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2224)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1733)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:509)
[2024-09-19 11:42:33] [crit]     at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:467)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.session.StandardSession.doReadObject(StandardSession.java:1576)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.session.StandardSession.readObjectData(StandardSession.java:1048)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:218)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.session.StandardManager.load(StandardManager.java:162)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.session.StandardManager.startInternal(StandardManager.java:354)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5163)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1848)
[2024-09-19 11:42:33] [crit]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[2024-09-19 11:42:33] [crit]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2024-09-19 11:42:33] [crit]     at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[2024-09-19 11:42:33] [crit]     at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1575)


[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
[2024-09-19 11:42:33] [crit]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2024-09-19 11:42:33] [crit]     at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[2024-09-19 11:42:33] [crit]     at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
[2024-09-19 11:42:33] [crit]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-09-19 11:42:33] [crit]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)



[2024-09-19 11:42:33] [crit]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-09-19 11:42:33] [crit]     at java.base/java.lang.reflect.Method.invoke(Method.java:569)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
[2024-09-19 11:42:33] [crit]     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
[2024-09-19 11:42:33] [crit] Context [] startup failed due to previous errors
[2024-09-19 11:42:33] [warning] Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
[2024-09-19 11:42:33] [warning] java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2269)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2256)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1627)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1555)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:443)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5432)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1848)
[2024-09-19 11:42:33] [warning]     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[2024-09-19 11:42:33] [warning]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2024-09-19 11:42:33] [warning]     at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[2024-09-19 11:42:33] [warning]     at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:123)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:772)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1575)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
[2024-09-19 11:42:33] [warning]     at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[2024-09-19 11:42:33] [warning]     at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
[2024-09-19 11:42:33] [warning]     at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:145)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
[2024-09-19 11:42:33] [warning]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-09-19 11:42:33] [warning]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[2024-09-19 11:42:33] [warning]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2024-09-19 11:42:33] [warning]     at java.base/java.lang.reflect.Method.invoke(Method.java:569)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
[2024-09-19 11:42:33] [warning]     at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
[2024-09-19 11:42:33] [info] Deployment of web application archive [/var/lib/tomcat9/webapps/ROOT.war] has finished in [8,993] ms
[2024-09-19 11:42:33] [info] Starting ProtocolHandler ["ajp-nio-0:0:0:0:0:0:0:1-8009"]
[2024-09-19 11:42:33] [info] Server startup in [9,187] milliseconds

You’ll need to upgrade to Tomcat 10 or switch to use the servlet container that is provided with Jenkins instead of using Tomcat. Jenkins 2.475 and later have upgraded several components including:

  • Spring Security 5 upgraded to Spring Security 6
  • Jetty 10 upgraded to Jetty 12
  • Java EE 8 upgraded to Jakarta EE 9

The Jenkins 2.475 changelog says:

Upgrade Spring Framework from 5.3.39 to 6.1.12, upgrade Spring Security from 5.8.14 to 6.3.3, and upgrade Java EE from 8 to 9. Users of the LDAP plugin must upgrade it to version 733.vd3700c27b_043 in lockstep with upgrading Jenkins core. Users of third-party servlet containers must upgrade the servlet container to an EE 9 version in accordance with the Jenkins Servlet Container Support Policy (emphasis added).

The servlet container policy notes that Tomcat and Wildfly are level 2 supported (patches accepted) and notes that 2.475 and later require:

  • Tomcat 10 or later, based on Servlet API 5.0 (Jakarta EE 9) or later with jakarta.servlet imports. (Weekly 2.475 and newer)
2 Likes

Thank you so much for the quick answer!

Yeah, I did not interpret the changelog correctly.

Best regards
Axel