-
|
DEBUG 2025-05-19 10:51:00.572 http-nio-9112-exec-2 AbstractMethodInterceptor : beforeMethod! DEBUG 2025-05-19 10:51:00.579 http-nio-9112-exec-2 AbstractMethodInterceptor : afterMethod |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
This is a confirmed bug in the Spring MVC plugin. Fixed in apache/skywalking-java#803. Root cause: The static initializer in AbstractMethodInterceptor checks javax.servlet and jakarta.servlet in an exclusive if/else. If javax.servlet is found first (even as a Fix: Check both servlet APIs independently — both IS_JAVAX and IS_JAKARTA can be true. The runtime isAssignableFrom checks on the actual request object type select the correct Temporary workaround: Exclude javax.servlet-api from your classpath if you're using Spring MVC 6.x (Jakarta). The fix will be available in the next SkyWalking Java Agent release (9.7.0). |
Beta Was this translation helpful? Give feedback.
This is a confirmed bug in the Spring MVC plugin. Fixed in apache/skywalking-java#803.
Root cause: The static initializer in AbstractMethodInterceptor checks javax.servlet and jakarta.servlet in an exclusive if/else. If javax.servlet is found first (even as a
transitive dependency), IS_JAVAX=true is set and the Jakarta check is skipped. At runtime, the request is jakarta.servlet.http.HttpServletRequest but IS_JAKARTA is false, so
no branch matches and IllegalStateException("this line should not be reached") is thrown.
Fix: Check both servlet APIs independently — both IS_JAVAX and IS_JAKARTA can be true. The runtime isAssignableFrom checks on the actual request object type select the correct
…