I am developing a small Spring application. I have to store the details of the student information in the database. I have developed one SimpleFormController. I have used Ne
I found the solution to this problem here: http://www.hildeberto.com/2008/05/hibernate-and-jersey-conflict-on.html
The NoSuchMethodError javadoc says this:
Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
In your case, this Error is a strong indication that your webapp is using the wrong version of the JAR defining the org.objectweb.asm.*
classes.
to resolve this kind of problem you should add two jar in your dependency POM (if use Maven)
<dependency>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.1</version>
</dependency>
I change my APIs as * cglib --- to ---> cglib-nodep-2.2.jar * cglib-asm --- to ---> cglib-asm.jar (i.e. latest one )
There is a lot of incompatibility between different versions of cglib and lots of poor advice that can be googled on this subject (use ancient versions of cglib-nodeb, etc). After wrestling with this nonsense for 3 days with an ancient version of Spring (2.5.6)I have discovered:
I encountered the same error when added http-builder to dependencies.
In my case, I could solve by simply excluding asm like this:
compile('org.codehaus.groovy.modules.http-builder:http-builder:0.7'){
excludes 'xml-apis'
exclude(group:'xerces', module: 'xercesImpl')
excludes 'asm'
}