Getting NoSuchMethodError: javax.servlet.ServletContext.addServlet in Spring Boot while running a Spring MVC application
If you want to find out where the class is being loaded from, try java -verbose:class -jar foo.jar | grep javax.servlet.ServletContext where foo.jar is the fat JAR produced by Gradle or Maven. For example, the ServletContext class could be getting read from an older servlet-api JAR in a JDK extensions directory instead of your Maven … Read more