I am developing a web application based on JSF technology. I use Eclipse as the IDE and using Apache Derby as a database.
When getting user input, I have one of the fields as a date field, i.e, Date of Birth. But when I update the database table, I get error report.
 Date Of Birth:
 <h:inputText value="#{employeeBean.dob}">
 <f:convertDateTime type="date" pattern="yyyy-mm-dd"/>
 </h:inputText>
Since the derby database accepts date in the format yyyy-mm-dd, I give input in the same way and have also used the same format.
This is the error I get.
 Exception while setting value for expression : #{employeeBean.dob} of component with 
 path : {Component-Path : [Class:javax.faces.component.UIViewRoot,ViewId: /homepage.jsp]
 [Class: javax.faces.component.html.HtmlForm,Id: j_id_jsp_996426310_1]
 [Class: javax.faces.component.html.HtmlInputText,Id: j_id_jsp_996426310_6]}
 Caused by:
 java.lang.IllegalArgumentException - Cannot convert 1/8/87 5:39 AM of type class
 java.util.Date to class java.sql.Date
Some one help me with this.