title: java.util.Date mapping in Hibernate
body: <p>i am new to struts and Hiberante.
  I am trying to map date in SQL table, always  null values are inserted.
  I am not getting the clear picture where is the error or mistake in code?</p>
  
  <pre><code>package com.acv.in.bean;
  import java.io.Serializable;
  import java.util.Date;
  public class Student implements Serializable{
  private long   stuid;
  private String sfname;
  private String slname;
  private Date dob;
  private String standard;
  private String ffname;
  private String flname;
  private String mfname;
  private String mlname;
  private String gfname;
  private String glname;
  private long   phone;
  
  
  public Student(String sfname, String slname, Date dob, String standard,
          String ffname, String flname, String mfname, String mlname,
          String gfname, String glname, long phone) {
      super();
      this.sfname = sfname;
      this.slname = slname;
      this.dob = dob;
      this.standard = standard;
      this.ffname = ffname;
      this.flname = flname;
      this.mfname = mfname;
      this.mlname = mlname;
      this.gfname = gfname;
      this.glname = glname;
      this.phone = phone;
    }
  
    public Student() {
  
    }
    //getter and setter
  }
  </code></pre>
  
  <p>my mapping file is</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"&gt;
   &lt;hibernate-mapping&gt;
  
   &lt;class name="com.acv.in.bean.Student" table="student" &gt;
      &lt;id name="stuid" type="long" &gt;
          &lt;column name="stuid" /&gt;
         &lt;generator class="org.hibernate.id.TableHiLoGenerator"/&gt;
      &lt;/id&gt;
       &lt;property name="ffname"  type="string"    column="ffname" /&gt;
       &lt;property name="flname"   type="string"    column="flname" /&gt;
       &lt;property name="gfname"   type="string"    column="gfname" /&gt;
       &lt;property name="glname"   type="string"    column="glname" /&gt;
       &lt;property name="mfname"   type="string"    column="mfname" /&gt;
       &lt;property name="mlname"   type="string"    column="mlname" /&gt;
       &lt;property name="sfname"   type="string"    column="sfname" /&gt;
       &lt;property name="slname"   type="string"    column="slname" /&gt;
       &lt;property name="standard" type="string"    column="standard" /&gt;
       &lt;property name="dob"      type="date"      column="dob" /&gt;
       &lt;property name="phone"    type="long"       column="phone" /&gt;
  
  &lt;/class&gt;
  &lt;/hibernate-mapping&gt;   
  </code></pre>
  
  <p>is it version problem( for hibernate/struts) ?</p>