How to pass parameter for Timestamp field through rest service?



  I am trying to pass value for the parameter of type java.sql.Timestamp through Rest service. If i check the jasper server log it throws error as 

 "Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.sql.Timestamp"

 How to pass the value? I am using JSON string in PUT option.


akthar.itzme's picture
Joined: Sep 23 2014 - 10:38pm
Last seen: 4 years 7 months ago

Kindly help me as soon as possible.

akthar.itzme - 6 years 2 months ago

1 Answer:


Please refer to JasperReports Server Web Services Guide

"Both date-only and timestamp fields are given in the ISO date-time format such as 1997-01-01T04:05:06+02:00.

"For database columns that store a time and date that includes a time zone, such as “timestamp with time zone” in PostgreSQL, the result is not guaranteed to be in the same timezone as stored in the database. These dates and times are converted to the server’s time zone."

tchen's picture
Joined: Feb 27 2008 - 7:33am
Last seen: 17 min 49 sec ago