Skip to content

Deserialization error with custom AnnotationIntrospector in Jackson 2.8.8 #1756

Closed
@danielnorberg

Description

@danielnorberg

In Jackson 2.8.8 I am getting a deserialization error when using a custom AnnotationIntrospector together with @JsonIgnore and @JsonDeserialize annotations.

An exception occured while executing the Java class. Can not construct instance of Repro$FoobarImpl: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)
at [Source: {"bar":"bar", "foo":"foo"}; line: 1, column: 2]
  • Jackson 2.8.6 and below works fine.
  • Omitting either @JsonIgnore or @JsonDeserialize annotations makes deserialization work.
  • Using a module to register custom deserializer instead of @JsonDeserialize also works.

Here is a full repro, as minimal as I could make it:

https://github.com/danielnorberg/jackson-28-annotation-introspection-breakage-repro

I will try to bisect my way to exactly what jackson commit is causing this issue.

Btw, thanks for Jackson, it's truly an awesome library and I'm always happy using it =)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions