Reputation: 39
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?
Upvotes: 3
Views: 7847
Reputation: 972
Possibilities & resolution !
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.
Check if your pom.xml
does not contain same dependency declarations (with same or different versions)
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
Upvotes: 3