java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError

Jenkins Setup:

Jenkins version: 2.248
agent jdk: jdk-17
JAVA_HOME variable is correctly set on agent and jenkins controller.
Jenkins agent is up and running.
restarted Jenkins instance and agent as well.

java.lang.ExceptionInInitializerError: Exception java.lang.ExceptionInInitializerError [in thread "pool-1-thread-18 for channel id=902"]
	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:378)
	at hudson.util.XStream2.<init>(XStream2.java:113)
	at hudson.ProxyConfiguration.<clinit>(ProxyConfiguration.java:392)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:375)
	at jdk.proxy4/jdk.proxy4.$Proxy9.<clinit>(Unknown Source)
Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to **<linux Slave_name>**

Caused: java.lang.NoClassDefFoundError: Could not initialize class jdk.proxy4.$Proxy9
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

Caused: java.io.IOException: Remote call on **<linux slave name>** failed

Java 17 was not supported until Jenkins 2.350 in Jenkins weekly.

If you are running Jenkins 2.248, then you’re running a controller that is 3.5 years old and trying to use a Java version that was first supported by Jenkins only 2.5 years ago.

This is not new setup we are doing.
We were able to run jenkins jobs with jdk 17 till 16th Feb 2024.
From Monday 19th Feb 2024, jenkins is throwing error.