Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE by Siwach16 · Pull Request #211 · FasterXML/jackson-annotations (original) (raw)

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation5 Commits2 Checks0 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

Siwach16

pjfanning

cowtowncoder

@cowtowncoder cowtowncoder changed the titleAdd enum features into JsonFormat.Feature Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE

Jan 17, 2023

@tmjchu

Hi folks:

After the 2.15 version upgrade -> I am starting to see
Wondering if READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE annotation gets applied by default in some place?

"name":"java.lang.NoSuchFieldError",
      "message":"READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE",
      "stacktrace":"\"at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.createContextual(EnumDeserializer.java:211)\n\tat com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836)\n\tat com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550)\n\tat com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294)\n\tat com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDes ....

@pjfanning

@tmjchu - it seems more likely that you are using an old version of jackson-annotations jar with a new version of jackson-databind jar. Try using matching versions, eg 2.15.0 for all jackson-* jars.

@cowtowncoder

@tmjchu As per @pjfanning error comes from old version of jackson-annotations or such -- version incompatibility across different Jackson components. This is one reason to use jackson-bom for getting consistent set of dependencies.