Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error in jackson library code

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.

like image 893
Manikandan Avatar asked May 18 '14 09:05

Manikandan


People also ask

Can Jackson use JAXB annotations?

With XML module Jackson provides support for JAXB (javax. xml. bind) annotations as an alternative to native Jackson annotations, so it is possible to reuse existing data beans that are created with JAXB to read and write XMLs.

What is JsonMappingException?

public class JsonMappingException extends JsonProcessingException. Checked exception used to signal fatal problems with mapping of content, distinct from low-level I/O problems (signaled using simple IOException s) or data encoding/decoding problems (signaled with JsonParseException , JsonGenerationException ).

What is Jackson library in Java?

Jackson is one such Java Json library used for parsing and generating Json files. It has built in Object Mapper class which parses json files and deserializes it to custom java objects. It helps in generating json from java objects.

What is JSON processing exception?

public class JsonProcessingException extends IOException. Intermediate base class for all problems encountered when processing (parsing, generating) JSON content that are not pure I/O problems. Regular IOException s will be passed through as is. Sub-class of IOException for convenience. See Also: Serialized Form.


1 Answers

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.

like image 136
alindsey Avatar answered Nov 15 '22 04:11

alindsey