Skip to content

Conversation

@Siwach16
Copy link
Contributor

@Siwach16 Siwach16 commented Jan 14, 2023

Add enum features into JsonFormat.Feature

  • READ_UNKNOWN_ENUM_VALUES_AS_NULL
  • READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE

Related PR: FasterXML/jackson-databind#3731
Issue : FasterXML/jackson-databind#3637

Note: Java Doc Comments are pending.

@cowtowncoder cowtowncoder merged commit 0050943 into FasterXML:2.15 Jan 17, 2023
@cowtowncoder cowtowncoder added this to the 2.15.0 milestone Jan 17, 2023
@cowtowncoder cowtowncoder changed the title Add enum features into JsonFormat.Feature Add JsonFormat.Features: READ_UNKNOWN_ENUM_VALUES_AS_NULL, READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE Jan 17, 2023
cowtowncoder added a commit that referenced this pull request Jan 17, 2023
@tmjchu
Copy link

tmjchu commented May 16, 2023

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
Copy link
Member

@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
Copy link
Member

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants