From the class cast exception you can see that these are 2 distinct types and can't be cast the from one to the other. To convert from java.util.Date
to java.sql.Date
, you can use:
java.util.Date date = new java.util.Date();
java.sql.Date sqlDate = new java.sql.Date(date.getTime());