org.springframework.restdocs.payload.PayloadHandlingException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0x20 at [Source: [B@3793896e; line: 30, column: 23]

codegur.com | 9 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

    JsonParseException: Invalid UTF-8 middle byte 0x20 with MockMVC and Maven

    Stack Overflow | 1 year ago | Francesco Papagno
    org.springframework.restdocs.payload.PayloadHandlingException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0x20 at [Source: [B@3793896e; line: 30, column: 23]
  2. 0

    JsonParseException: Invalid UTF-8 middle byte 0x20 with MockMVC and Maven

    codegur.com | 9 months ago
    org.springframework.restdocs.payload.PayloadHandlingException: com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0x20 at [Source: [B@3793896e; line: 30, column: 23]

    Root Cause Analysis

    1. org.springframework.restdocs.payload.PayloadHandlingException

      com.fasterxml.jackson.core.JsonParseException: Invalid UTF-8 middle byte 0x20 at [Source: [B@3793896e; line: 30, column: 23]

      at com.fasterxml.jackson.core.JsonParser._constructError()
    2. Jackson-core
      UTF8StreamJsonParser.getText
      1. com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1419)
      2. com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:508)
      3. com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidOther(UTF8StreamJsonParser.java:3223)
      4. com.fasterxml.jackson.core.json.UTF8StreamJsonParser._reportInvalidOther(UTF8StreamJsonParser.java:3230)
      5. com.fasterxml.jackson.core.json.UTF8StreamJsonParser._decodeUtf8_3fast(UTF8StreamJsonParser.java:3036)
      6. com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2216)
      7. com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString(UTF8StreamJsonParser.java:2165)
      8. com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getText(UTF8StreamJsonParser.java:279)
      8 frames
    3. Jackson
      ObjectMapper.readValue
      1. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:441)
      2. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapObject(UntypedObjectDeserializer.java:574)
      3. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:423)
      4. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapArray(UntypedObjectDeserializer.java:510)
      5. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:437)
      6. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.mapObject(UntypedObjectDeserializer.java:552)
      7. com.fasterxml.jackson.databind.deser.std.UntypedObjectDeserializer$Vanilla.deserialize(UntypedObjectDeserializer.java:423)
      8. com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3066)
      9. com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2230)
      9 frames
    4. org.springframework.restdocs
      RestDocumentationResultHandler.handle
      1. org.springframework.restdocs.payload.JsonContentHandler.readContent(JsonContentHandler.java:81)
      2. org.springframework.restdocs.payload.JsonContentHandler.findMissingFields(JsonContentHandler.java:49)
      3. org.springframework.restdocs.payload.AbstractFieldsSnippet.validateFieldDocumentation(AbstractFieldsSnippet.java:112)
      4. org.springframework.restdocs.payload.AbstractFieldsSnippet.createModel(AbstractFieldsSnippet.java:73)
      5. org.springframework.restdocs.snippet.TemplatedSnippet.document(TemplatedSnippet.java:64)
      6. org.springframework.restdocs.mockmvc.RestDocumentationResultHandler.handle(RestDocumentationResultHandler.java:101)
      6 frames
    5. Spring TestContext
      MockMvc$1.andDo
      1. org.springframework.test.web.servlet.MockMvc$1.andDo(MockMvc.java:158)
      1 frame