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]

Spring JIRA | Craig Walls | 3 years ago
  1. 0

    Carried over from SOCIAL-423: I tried the latest build but I get 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.web.client.RestTemplate.getForObject(RestTemplate.java:255) at org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50) at org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:46) exception

    Spring JIRA | 3 years ago | Craig Walls
    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]
  2. 0

    dynamic json response: Could not read JSON: N/A (through reference chain) jackson fasterxml

    Stack Overflow | 2 years ago | Sven Deckers
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: N/A (through reference chain: be.kava.farma.modules.prins.ImageListingResponse["123465"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: N/A (through reference chain: be.kava.farma.modules.prins.ImageListingResponse["123456"])
  3. 0

    how to map spring-data-rest JSON response with its object using RestTEmplate

    Stack Overflow | 2 months ago | SST
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized field "_embedded" (Class com.foo.support.model.Person), not marked as ignorable at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@d4aff35; line: 2, column: 18] (through reference chain: com.foo.support.model.Person["_embedded"]); nested exception is org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "_embedded" (Class com.foo.support.model.Person), not marked as ignorable at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@d4aff35; line: 2, column: 18] (through reference chain: com.foo.support.model.Person["_embedded"])
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Jackson JSON - "no single-String constructor/factory method" error on unmarshal

    Stack Overflow | 2 years ago | sat
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Can not instantiate value of type [simple type, class com.mycompany.UpdateUserRoleReq] from String value ('{"name":"admin_1407445357682"}'); no single-String constructor/factory method; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class com.mycompany.UpdateUserRoleReq] from String value ('{"name":"admin_1407445357682"}'); no single-String constructor/factory method
  6. 0

    Jackson JSON

    pr8x.com | 8 months ago
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Can not instantiate value of type [simple type, class com.mycompany.UpdateUserRoleReq] from String value ('{"name":"admin_1407445357682"}'); no single-String constructor/factory method; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class com.mycompany.UpdateUserRoleReq] from String value ('{"name":"admin_1407445357682"}'); no single-String constructor/factory method

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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()
    2. Spring
      RestTemplate.getForObject
      1. org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:228)
      2. org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.read(MappingJackson2HttpMessageConverter.java:220)
      3. org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:95)
      4. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:549)
      5. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:517)
      6. org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:255)
      6 frames
    3. Facebook API
      UserTemplate.getUserProfile
      1. org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:165)
      2. org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:50)
      3. org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:46)
      3 frames