java error:
java.io.EOFException: No content to map to Object due to end of input
org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2433) [jackson-mapper-asl-1.8.1.jar:1.8.1]
at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2366) [jackson-mapper-asl-1.8.1.jar:1.8.1]
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1162) [jackson-mapper-asl-1.8.1.jar:1.8.1]
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:410) [jackson-jaxrs-1.8.1.jar:1.8.1]
This problem bothered me for a long time, and finally I found out that the reason is
Content-Type I set to application/jsoncharset=utf-8, but the actual passing of parameters to the server did not pass json parameters, resulting in at org.codehaus.jackson.map.ObjectMapper._readValue not reading json data, resulting in an error.
Solution: When json data is not passed, ‘Content-Type’ can be set to ‘application/x-www-form-urlencoded charset=utf-8’.
Similar Posts:
- @Jsonignoreproperties does not work [How to Solve]
- [Solved] com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field “FileSi…
- [How to Solve] jackson not marked as ignorable
- Uncaught typeerror: the solution of illegal invocation problem
- [Solved] Jquery each error: Uncaught TypeError: Cannot use ‘in’ operator to search for
- [Solved] com.fasterxml.jackson.core.JsonParseException: Illegal unquoted character ((CTRL-CHAR, code 10)): ha
- Springboot is compatible with jackson.databind and reports errors [How to Solve]
- How to Solve Curl pass large JSON files Error
- com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class tonels.
- Postman reported an error unsupported media type [How to Solve]