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’.