Skip to content
Advertisement

loadOnStartup SEVERE: Servlet [dispatcher] in web application [/Producer] threw load() exception java.lang.NoSuchMethodError

I have a problem with setting up spring context using Eclipse + tomcat 8. I have checked several “Hello world” spring manuals and do not understand what is going wrong.

JavaScript

I have the following error in console:

JavaScript

Advertisement

Answer

Somewhere in your classpath you have old Spring lib.

AnnotationUtils from 4.2.1 contains rethrowAnnotationConfigurationException

But in spring 3.2.5 – no such method exists.

As obviously 3.2 <= 4.2 your tomcat will pick up 3.2 library into classpath first – breaking your code.

Maven dependencies can be a bitch – I’m pretty sure somewhere you include that old version.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement