I have upgraded the springboot to 3.1.1 and spring 6 with JDK17. compile successful but after installing all dependencies not able to run application
getting below error
jakarta.servlet.ServletException: Handler dispatch failed: java.lang.NoSuchMethodError: ‘void org.springframework.http.ResponseEntity.(java.lang.Object, org.springframework.http.HttpStatus)’
any suggestion ?
can you share also pom.xml or build.gradle file ?
Direction to start looking into would be stackoverflow.com/questions/35186/…
Do you have custom exception handlers defined in your Springboot app? With Spting 6 there was a change in the signature of the ResponseEntityExceptionHandler. You may need to modify your exception handlers.
Using incompatible libraries or trying to outsmart the dependencies managed by Spring (Boot) (more then oftern it is the latter).