eclipse-platform / eclipse.platform

https://eclipse.dev/eclipse/
Eclipse Public License 2.0
84 stars 113 forks source link

ClassNotFoundException javax.servlet.http.HttpServletRequest #1522

Closed DerekSansom closed 3 months ago

DerekSansom commented 3 months ago

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)

Version: 2024-06 (4.32.0) Build id: 20240606-1231

I have a Java SpringBoot project with integration tests, when trying to run any test that loads the context it fails with

java.lang.IllegalStateException: Failed to introspect Class [org.springdoc.webmvc.api.OpenApiWebMvcResource] from ClassLoader

Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[na:na] ... 156 common frames omitted

However same tests pass from commandline

The project uses Java21 so java.servlet package no longer exists, Eclipse is I believe running on it's own embedded java17 so it shouldn't even be looking for javax packages, everything moved to eclipses own jakarta long ago

DerekSansom commented 3 months ago
org.springdoc springdoc-openapi-starter-webmvc-ui 2.5.0
    is causing the issue, it still shouldb't be an issue, but I can fix it now