Skip to content

[Bug] mvc-annotation-commons NoSuchMethodError ServerHttpRequest.getMethodValue() #11652

@CzyerChen

Description

@CzyerChen

Search before asking

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

Apache SkyWalking Component

Java Agent (apache/skywalking-java)

What happened

Run a project with

  • SpringBoot 3.2.0(released at 2023.11.03)
  • apm-springmvc-annotation-commons-9.1.0.jar
  • apm-springmvc-annotation-6.x-plugin-9.1.0.jar

can not trace SpringMVC node because of the error from java-agent logs

java.lang.NoSuchMethodError: 'java.lang.String org.springframework.http.server.reactive.ServerHttpRequest.getMethodValue()'
	at org.apache.skywalking.apm.plugin.spring.mvc.commons.interceptor.AbstractMethodInterceptor.beforeMethod(AbstractMethodInterceptor.java:171)
	at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:76)

but works fine with SpringBoot previous version, like 3.1.0.

With the error and the source code, see that:

public interface HttpRequest extends HttpMessage {
......
	@Deprecated(since = "6.0", forRemoval = true)
	default String getMethodValue() {
		return getMethod().name();
	}
......
}

the method getMethodValue removed from SpringBoot 3.2.0

What you expected to happen

SpringMVC node can be traced with SpringBoot 3.1.0, and can not traced with SpringBoot 3.2.0.
We should fix the bug.

How to reproduce

Run a normal SpingBoot project with

  • SpringBoot 3.2.0(released at 2023.11.03)
  • apm-springmvc-annotation-commons-9.1.0.jar
  • apm-springmvc-annotation-6.x-plugin-9.1.0.jar

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working and you are sure it's a bug!javaJava agent relatedpluginPlugin for agent or collector. Be used to extend the capabilities of default implementor.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions