8

We are using dropwizard version 0.6.3. When we try to upgrade version 0.7.0, we are getting this error on service start.

Exception in thread "main" java.lang.VerifyError: class com.fasterxml.jackson.module.afterburner.deser.SuperSonicBeanDeserializer overrides final method deserialize.(Lcom/fasterxml/jackson/core/JsonParser;Lcom/fasterxml/jackson/databind/DeserializationContext;)Ljava/lang/Object;

Tried searching, didn't get any solution. When i looked into SuperSonicBeanDeserializer class, it has one override method. But the class SuperSonicBeanDeserializer is final. I'm not sure how to resolve this problem. Any solution/suggestion, will help us lot.

Manikandan
  • 3,025
  • 2
  • 19
  • 28
  • Most probably you have two versions of the Jackson library in your class path. How do you build your application? – Alexey Gavrilov May 18 '14 at 09:05
  • Thanks. As part of one dependency mudule, different jackson version also included.. – Manikandan May 18 '14 at 09:41
  • Can you get rid of the different Jackson version? Otherwise that may cause all kinds of problems. I recommend you to stick to the latest Jackson version that comes with Dropwizard. – Alexey Gavrilov May 18 '14 at 09:48
  • It is especially important that version of Afterburner module is compatible with core Jackson components (jackson-core, jackson-databind): patch versions may differ, but minor version MUST match. It sounds like this is the root cause in your case. – StaxMan May 19 '14 at 19:25

1 Answers1

10

A look at the maven dependency tree should help find where the problem is:

mvn dependency:tree -Dverbose

Look for "omitted for conflict" within the results. You likely have a version of jackson-databind older than 2.3.0 that is overriding the version in Dropwizard 0.7.

alindsey
  • 101
  • 2
  • This solved the problem for me, and was able to fix it in two different ways. One specify jackson-databind as a dependency and set the version to 2.3.x, or Two set an exclusions on the dependency that was bringing in the old version of jackson. – bramp Jun 12 '14 at 22:56
  • 2
    You can also use: 'mvn dependency:tree -Dverbose -Dincludes=:jackson-databind::' in order to get a more precise information of the paths to this dependency – Ivan Hristov Jun 14 '14 at 10:00