3

I'm getting the NoSuchmethodError while hitting the endpoints from the postman. I have recently migrated from spring 1.15 to 2.5.8.

Here are my spring versions. id 'org.springframework.boot' version '2.5.8' id 'io.spring.dependency-management' version '1.0.11.RELEASE'

Any thoughts on fixing the issue?

1 Answer 1

3

Possibilities & resolution !

  1. Check if that method is available under the class under which it is throwing error! You can check it from under Maven dependencies by expanding that particular library.

  2. Check if your pom.xml does not contain same dependency declarations (with same or different versions)

  3. Delete the redundant dependency from classpath to make sure only one exist. Most likely, NoSuchMethodError appears when there is more than 1 same dependency on classpath and and older version (or first encountered) is picked up !

Check if these articles help

How do I fix a NoSuchMethodError?

How to resolve java.lang.NoSuchMethodError

How to get java.lang.NoSuchMethodError

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.