Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Withess classes selection error in springmvc-annotation-5.x-plugin #11053

Closed
3 tasks done
xzyJavaX opened this issue Jul 6, 2023 · 5 comments
Closed
3 tasks done
Assignees
Labels
agent Language agent related. bug Something isn't working and you are sure it's a bug! java Java agent related plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor.
Milestone

Comments

@xzyJavaX
Copy link
Contributor

xzyJavaX commented Jul 6, 2023

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

Java Agent (apache/skywalking-java)

What happened

When using spring 3.1.4.RELEASE , springmvc-annotation-5.x-plugin throws java.lang.NoSuchMethodError.
Error log:

java.lang.NoSuchMethodError: org.springframework.web.context.request.ServletRequestAttributes.getResponse()Ljavax/servlet/http/HttpServletResponse;
   at org.apache.skywalking.apm.plugin.spring.mvc.v5.GetBeanInterceptor.afterMethod(GetBeanInterceptor.java:56)
   at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:97)
   at org.springframework.web.method.HandlerMethod.getBean(HandlerMethod.java)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.createRequestMappingMethod(RequestMappingHandlerAdapter.java:640)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:610)
   at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
   at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
   at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:900)
   at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:827)
   at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
   at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
...

springmvc-annotation-5.x-plugin selected withess class is org.springframework.beans.annotation.AnnotationBeanUtils , and org.springframework.beans.annotation.AnnotationBeanUtils  also exists in spring3

What you expected to happen

No response

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@xzyJavaX xzyJavaX added the bug Something isn't working and you are sure it's a bug! label Jul 6, 2023
@wu-sheng
Copy link
Member

wu-sheng commented Jul 6, 2023

Don't we have Spring3 plugin test for this? This should not happen.

@wu-sheng wu-sheng added agent Language agent related. java Java agent related plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor. labels Jul 6, 2023
@wu-sheng wu-sheng added this to the Java - 9.0.0 milestone Jul 6, 2023
@xzyJavaX
Copy link
Contributor Author

xzyJavaX commented Jul 6, 2023

There are have Spring3 plugin test for this, but this error will only be reflected in the logs, and the test can still pass.

@wu-sheng
Copy link
Member

wu-sheng commented Jul 6, 2023

Then what is missed? AFAIK, if this fails, some information should miss, otherwise, why need these codes?

@xzyJavaX
Copy link
Contributor Author

xzyJavaX commented Jul 6, 2023

These codes should only take effect in spring5, but they are now incorrectly taking effect in spring3.

@wu-sheng
Copy link
Member

wu-sheng commented Jul 6, 2023

OK, got your point. Please go ahead. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Language agent related. bug Something isn't working and you are sure it's a bug! java Java agent related plugin Plugin for agent or collector. Be used to extend the capabilities of default implementor.
Projects
None yet
Development

No branches or pull requests

2 participants