com.fasterxml.jackson.databind.JsonMappingException: Argument #1 of constructor [constructor for com.analyticspot.ml.framework.testutils.WordCounts, annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)}] has no property name 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]

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.

,

The easiest solution is to provide a default constructor for the class you want to convert from/to json.

Solutions on the web

via GitHub by oliverdain
, 10 months 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 charlie_pl
, 6 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 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]
via GitHub by michaelaberman
, 10 months ago
Class JacksonSubclassCollectionTest$SomeBaseClass not subtype of [simple type, class JacksonSubclassCollectionTest$SomeSubClass] at [Source: {"collection":[{"type":"SUBCLASS","field":7}]}; line: 1, column: 1]
com.fasterxml.jackson.databind.JsonMappingException: Argument #1 of constructor [constructor for com.analyticspot.ml.framework.testutils.WordCounts, annotations: {interface com.fasterxml.jackson.annotation.JsonCreator=@com.fasterxml.jackson.annotation.JsonCreator(mode=DEFAULT)}] has no property name 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]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:305)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:268)
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:476)
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:3899)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3794)
at com.analyticspot.ml.framework.serialization.GraphSerDeserTest.testTokenGroupsSerialize(GraphSerDeserTest.kt:166)

Users with the same issue

7 times, 3 days ago
7 times, 1 week ago
5 times, 1 week ago
2 times, 1 week ago
4 times, 3 weeks ago

Write tip

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