com.fasterxml.jackson.databind.JsonMappingException: Class JacksonSubclassCollectionTest$SomeBaseClass not subtype of [simple type, class JacksonSubclassCollectionTest$SomeSubClass] at [Source: {"collection":[{"type":"SUBCLASS","field":7}]}; line: 1, column: 1]

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

Solutions on the web

via GitHub by michaelaberman
, 1 year ago
Class JacksonSubclassCollectionTest$SomeBaseClass not subtype of [simple type, class JacksonSubclassCollectionTest$SomeSubClass] at [Source: {"collection":[{"type":"SUBCLASS","field":7}]}; line: 1, column: 1]
via Stack Overflow by charlie_pl
, 7 months ago
Argument #0 of constructor [constructor for Task, annotations: [null]] has no property name annotation; must have name when multiple-parameter constructor annotated as Creator at [Source: {"id":"AT-5", ...}; line: 1, column: 1]
via GitHub by oliverdain
, 1 year ago
annotation; must have name when multiple-parameter constructor annotated as Creator at [Source: {"sourceToken":{"id":{"name":"words","clazz":"java.util.List"}},"resultId":{"prefix":"wordCounts","clazz":"java.lang.Integer"},"wordMap":{"foo":0,"bar":1,"baz":2}}; line: 1, column: 1]
via Stack Overflow by Victor Stafusa
, 1 year ago
=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)}] has no property name annotation; must have name when multiple-parameter constructor annotated as Creator at [Source: {"z":5,"xoom":"a"}; line: 1, column: 1]
via GitHub by igorgsh
, 1 year ago
Class com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer has no default (no arg) constructor at [Source: {"local":[2016,4,19,15,50,7,120000000],"instant":1461070207.180000000}; line: 1, column: 1]
via GitHub by azuritus
, 1 year ago
Class Jackson1311$B not subtype of [simple type, class Jackson1311$C] at [Source: {}; line: 1, column: 1]
java.lang.IllegalArgumentException: Class JacksonSubclassCollectionTest$SomeBaseClass not subtype of [simple type, class JacksonSubclassCollectionTest$SomeSubClass]
at com.fasterxml.jackson.databind.type.TypeFactory.constructSpecializedType(TypeFactory.java:359)
at com.fasterxml.jackson.databind.jsontype.impl.StdTypeResolverBuilder.buildTypeDeserializer(StdTypeResolverBuilder.java:118)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findTypeDeserializer(BasicDeserializerFactory.java:1363)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findPropertyContentTypeDeserializer(BasicDeserializerFactory.java:1526)
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.resolveMemberAndTypeAnnotations(BasicDeserializerFactory.java:1841)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.constructSettableProperty(BeanDeserializerFactory.java:735)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:520)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:226)
at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:141)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:406)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:352)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:475)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3890)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3785)
at undefined.JacksonSubclassCollectionTest.main(JacksonSubclassCollectionTest.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)

Users with the same issue

Once, 5 months ago
Once, 6 months ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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