com.fasterxml.jackson.databind.JsonMappingException: Problem deserializing property 'c' (expected type: [simple type, class com.fasterxml.jackson.failing.Polymorphic1311Test$C]; actual type: com.fasterxml.jackson.failing.Polymorphic1311Test$B), problem: Can not set com.fasterxml.jackson.failing.Polymorphic1311Test$C field com.fasterxml.jackson.failing.Polymorphic1311Test$X.c to com.fasterxml.jackson.failing.Polymorphic1311Test$B at [Source: {"c":{ }}; line: 1, column: 8] (through reference chain: com.fasterxml.jackson.failing.X["c"])

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Try indicating constructor to use @JsonCreator annotation.

,

You are trying to deserialize a type for which Jackson does not provide a default mapper. You should create your custom mapper for this type.

Solutions on the web

via GitHub by cowtowncoder
, 1 year ago
com.fasterxml.jackson.failing.Polymorphic1311Test$C field com.fasterxml.jackson.failing.Polymorphic1311Test$X.c to com.fasterxml.jackson.failing.Polymorphic1311Test$B at [Source: {"c":{ }}; line: 1, column: 8] (through reference chain: com.fasterxml.jackson.failing.X["c"])
via GitHub by galan
, 7 months ago
Could not resolve type id 'Turtle' into a subtype of [simple type, class mypackage.Animal] at [Source: N/A; line: -1, column: -1] (through reference chain: mypackage.Zoo["animals"])
via Google Groups by Daniel Goldin, 4 months ago
Could not resolve type id 'namespace' into a subtype of [simple type, class io.druid.query.extraction.LookupExtract or] at [Source: HttpInputOverHTTP@328be276; line: 1, column: 259] (through reference chain: java.util.ArrayList[0])
via Stack Overflow by Dag
, 2 years ago
Could not resolve type id 'Turtle' into a subtype of [simple type, class mypackage.Animal] at [Source: N/A; line: -1, column: -1] (through reference chain: mypackage.Zoo["animals"])
via qiita.com by Unknown author, 1 year ago
Can not construct instance of sample.jackson.AbstractClass, problem: abstract types either need to be mapped to concrete types, have custom deserializer, or be instantiated with additional type information at [Source: java.io.StringReader@2ef5e5e3; line: 1, column: 10] (through reference chain: sample.jackson.Dto["list"])
via Stack Overflow by tewe
, 2 years ago
Unexpected token (VALUE_STRING), expected FIELD_NAME: missing property 'supporterType' that is to contain type id (for class com.facer.domain.supporter.SupporterEntity) at [Source: HttpInputOverHTTP@4321c221; line: 1, column: 2] (through reference chain: com.facer.domain.supporter.ContactEntity["supporter"])
com.fasterxml.jackson.databind.JsonMappingException: Problem deserializing property 'c' (expected type: [simple type, class com.fasterxml.jackson.failing.Polymorphic1311Test$C]; actual type: com.fasterxml.jackson.failing.Polymorphic1311Test$B), problem: Can not set com.fasterxml.jackson.failing.Polymorphic1311Test$C field com.fasterxml.jackson.failing.Polymorphic1311Test$X.c to com.fasterxml.jackson.failing.Polymorphic1311Test$B at [Source: {"c":{ }}; line: 1, column: 8] (through reference chain: com.fasterxml.jackson.failing.X["c"])

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
5 times, 1 day ago
4 times, 1 day ago
135 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.