title: java.util.Date cannot be cast to java.sql.Date while trying to insert data to database table
body: <p>String query1 ="insert into ORDER_T(ORDER_ID,ordernumber,ordertotal,ORDERDESCRIPTION,CREATEDDATE,"
                  + "UPDATEDDATE) values(?,?,?,?,TO_DATE(?,'dd/mm/yyyy'),TO_DATE(?,'dd/mm/yyyy'))";</p>
  
  <pre><code>        preparedSt=con.prepareStatement(query1);
          preparedSt.setString(1, order.getOrderId());
          preparedSt.setString(2, order.getOrderNumber());
          preparedSt.setString(3, order.getOrderDescription());
          preparedSt.setBigDecimal(4, order.getOrderTotal());         
          preparedSt.setDate(5,(java.sql.Date) order.getCreatedDate());// java.util.Date cannot be cast to java.sql.Date
          preparedSt.setDate(6, (java.sql.Date) order.getUpdatedDate());// java.util.Date cannot be cast to java.sql.Date
          result=preparedSt.executeUpdate();
  </code></pre>
  
  <p><strong>console</strong>
  connection success!!
  java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Date
      at com.cloudbill.order.process.OrderProcessorImpl.placeOrder(OrderProcessorImpl.java:129)
      at com.cloudbill.order.bo.OrderMain.main(OrderMain.java:174)
  java.lang.ClassCastException: java.util.Date cannot be cast to java.sql.Date
      at com.cloudbill.order.process.OrderProcessorImpl.placeOrder(OrderProcessorImpl.java:129)
      at com.cloudbill.order.bo.OrderMain.main(OrderMain.java:174)</p>