I have a RESTful API on Jersey 2.17 with Jackson on JDK8. It is JSON style API. This API accepts a Java object, it has this field:
@JsonProperty("processEndTime")
public Timestamp getRunDate() {
return runDate;
}
@JsonProperty("processEndTime")
public void setRunDate(Timestamp runDate) {
this.runDate = runDate;
}
Now when I submit a small number, it works perfectly like this:
"processEndTime" : 1434989360,
But it fails when the number is big one, like this:
"processEndTime" : 1434989360380,
The most weird thing is that I had a Jmeter test case, it sent the exact the same big number, it can pass without any issues. I can verify this number on the server side and confirmed it is correctly passed.
The full error message is:
Can not deserialize instance of java.sql.Timestamp out of VALUE_NUMBER_FLOAT token at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@23117fbd; line: 1, column: 562] (through reference chain: com.abc.api.dto.MyClassA["processEndTime"])
Any suggestions?