org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; 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

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Spring JIRA by Craig Walls, 1 year ago
: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]
via Stack Overflow by e p
, 5 months ago
Could not read JSON: Current token (VALUE_STRING) not numeric, can not use numeric value accessors at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@44908881; line: 1, column: 159]; nested exception is
via Stack Overflow by Shawn Clark
, 2 years ago
Could not read JSON: Attempted read from closed stream.; nested exception is java.io.IOException: Attempted read from closed stream.
via Stack Overflow by Grzegorz Gralak
, 1 month ago
Could not read JSON: Unrecognized field "nonExistingProperty" (class integration.ul.message.CampaignSetupResponse), not marked as ignorable (one known property: "status"]) at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream
via Stack Overflow by Mani
, 10 months ago
Could not read JSON: Can not deserialize instance of com.att.um.web.services.rest.model.JsonRequest out of START_ARRAY token at [Source: io.undertow.servlet.spec.ServletInputStreamImpl@43e804cf; line: 1, column: 1]; nested exception is
via GitHub by monfor
, 1 year ago
Could not read JSON: Numeric value (2978969079) out of range of int at [Source: org.apache.http.client.entity.LazyDecompressingInputStream@6848db81; line: 17, column: 40] (through reference chain: com.cloudera.nav.sdk.client.SourceAttrs
org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]; nested exception is com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class org.springframework.social.facebook.api.FacebookProfile]: can not instantiate from JSON object (need to add/enable type information?) at [Source: java.io.ByteArrayInputStream@7e305fb2; line: 1, column: 2]
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:228)
at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.read(MappingJackson2HttpMessageConverter.java:220)
at org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:95)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:549)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:517)
at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165)
at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50)

Users with the same issue

Once, 4 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.