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"])

Stack Overflow | SST | 5 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    Stack Overflow | 5 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"])
  2. 0

    Could not read JSON: Unrecognized field (...), not marked as ignorable

    Stack Overflow | 2 years ago | Maik
    org.springframework.http.converter.HttpMessageNotReadableException: Could not read JSON: Unrecognized field "uri" (Class org.json.JSONObject), not marked as ignorable at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@6f526c5f; line: 2, column: 12] (through reference chain: org.json.JSONObject["uri"]); nested exception is org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "uri" (Class org.json.JSONObject), not marked as ignorable at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@6f526c5f; line: 2, column: 12] (through reference chain: org.json.JSONObject["uri"])
  3. 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]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    1 unregistered visitors

    Root Cause Analysis

    1. 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"])

      at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readInternal()
    2. Spring
      RestTemplate.getForObject
      1. org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.readInternal(MappingJacksonHttpMessageConverter.java:127)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      2. org.springframework.http.converter.AbstractHttpMessageConverter.read(AbstractHttpMessageConverter.java:153)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      3. org.springframework.web.client.HttpMessageConverterExtractor.extractData(HttpMessageConverterExtractor.java:81)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      4. org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:446)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      5. org.springframework.web.client.RestTemplate.execute(RestTemplate.java:401)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      6. org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:199)[spring-web-3.1.0.RELEASE.jar:3.1.0.RELEASE]
      6 frames