It is because, internally getAsObject() in converter performs SimpleDateFormat_instance.parse() operation which return a java.util.Date type of object. Now an java.sql.Date type reference can't hold a java.util.Date type of object (only parent can hold a reference to child object)
Joined: May 30, 2002
Originally posted by Marc Peabody: I believe the problem is that you have 3 'M's in your pattern.
1. It takes the input in the form of "String" 2. Passes the String to getAsObject method 3. getAsObject method, ultimately calls SimpleDateFormat.parse(String str) method and return the output of this method to you.