I need to use java.util.Calendar in order for Axis2 webservice client to send/receive Date objects. So in my JPA model object I changed all java.sql.Date into java.util.Calendar. By using java.util.Calendar the Axis2 webservice part work ok.
I'm able to save a java.util.Calendar object into database. Problem is that I can not read the object back from database!!!
When I try to read a saved object from SQL Server 2008 I get this error:
An error occurred while converting the nvarchar value to JDBC data type TIMESTAMP.
In database the date field where it fails to read is of type "date". Also if in database I change the date field to type "datetime" it works ok, but I to use the "date" type. Anyone has any clues on how to fix this?