com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.google.common.collect.HashBasedTable]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: {"row1":{"col2":"cell12","col1":"cell11"},"row2":{"col2":"cell22","col1":"cell21"}}; line: 1, column: 2]

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

,

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

,
Expert tip

Try indicating constructor to use @JsonCreator annotation.

Solutions on the web

via Stack Overflow by X. Wo Satuk
, 1 year ago
No suitable constructor found for type [simple type, class com.google.common.collect.HashBasedTable]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: {"row1":{"col2":"cell12","col1":"cell11"},"row2":{"col2":"cell22","col1":"cell21"}}; line: 1, column: 2]
via GitHub by n0mer
, 1 year ago
No suitable constructor found for type [simple type, class org.springframework.security.oauth2.provider.OAuth2Authentication]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: [B@3f6a0353; line: 1, column: 2]
via GitHub by michaelhixson
, 2 years ago
No suitable constructor found for type [simple type, class Example$None]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: {"numbers":[1,2,3]}; line: 1, column: 2]
via Stack Overflow by Quantum
, 2 years ago
No suitable constructor found for type [simple type, class com._3esi.load.bootstrap.ScratchPad$SimpleTest]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: { "s1" : "a", "map" : { } }; line: 2, column: 3]
via GitHub by guspower
, 1 year ago
No suitable constructor found for type [simple type, class informa.GusSpec$Wrapper<informa.GusSpec$Base>]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: { "value" : { "name" : "typeA" } }; line: 2, column: 3]
via programask.com by Unknown author, 2 years ago
No suitable constructor found for type [simple type, class com.fg.mail.smtp.AgentResponse<java.util.Map<java.lang.String,java.lang.Integer>>]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.InputStreamReader@4f2d26d; line: 1, column: 2]
com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.google.common.collect.HashBasedTable]: can not instantiate from JSON object (missing default constructor or creator, or perhaps need to add/enable type information?) at [Source: {"row1":{"col2":"cell12","col1":"cell11"},"row2":{"col2":"cell22","col1":"cell21"}}; line: 1, column: 2]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:255)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1130)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:298)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:133)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3807)
at com.gk.dfm.repository.impl.JsonTableTest.jsonTable(JsonTableTest.java:31)

Users with the same issue

3 times, 1 week ago
Once, 1 week ago
Once, 3 weeks ago
6 times, 3 weeks ago
12 times, 4 weeks ago

Write tip

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