Note that there are some explanatory texts on larger screens.

plurals
  1. POJackson + Tomcat - java.lang.VerifyError: Cannot inherit from final class
    text
    copied!<p>I have a Java webservice running in Tomcat 6 which accepts JSON input. I am trying to use Jackson ObjectMapper to parse the input json. But when initializing the ObjectMapper object I am getting this error</p> <pre><code>16:08:13,616 ERROR [[jersey]] Servlet.service() for servlet jersey threw exception java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2733) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1124) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1612) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491) at com.test.project.offline.ws.WsApiResource.updateData(WsApiResource.java:169) ....... </code></pre> <p>At line 169 I have this <code>ObjectMapper mapper = new ObjectMapper();</code> </p> <p>When calling com.test.project.offline.ws.WsApiResource.updateData() method locally in a unit test it works without any error.</p> <p>Kindly help me in fixing this. I am using Jackson 1.8.4 and tomcat 6. </p> <p>UPDATE: Fixed the issue. Problem was a different version of jackson in the dependency tree. Excluding it fixed the problem.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload