Issue
I have a spring-boot application deployed on websphere 8.5.5. With spring-boot 2.3.x it works correctly, while after updating to version 2.5.x. The simple stack trace is:
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpSessionIdListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:610)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtClassLoader.java:244)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:942)
at java.lang.ClassLoader.loadClass(ClassLoader.java:887)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:135)
at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:587)
at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:619)
at java.lang.ClassLoader.loadClass(ClassLoader.java:870)
... 120 more
The class loader is set to PARENT_LAST
Solution
Spring Boot 2.5 requires Servlet 3.1 / Java EE 7.
WebSphere 8.5 is Servlet 3.0 / Java EE 6 only.
You'll need WebSphere 9.0 for support of Servlet 3.1. / Java EE 7 as required by Spring Boot 2.5.
Answered By - covener
Answer Checked By - Candace Johnson (JavaFixing Volunteer)