title: How to map oracle timestamp to appropriate java type in hibernate?
body: <p>I am new to hibernate and I am stumped. In my database I have tables that have a columns of <code>TIMESTAMP(6)</code>. I am using Netbeans 6.5.1 and when I generate the <code>hibernate.reveng.xml</code>, <code>hbm.xml files</code>, and <code>pojo files</code> it sets the columns to be of type <code>Serializable</code>. This is not what I expected, nor what I want them to be. </p>
  
  <p>I found <a href="https://forum.hibernate.org/viewtopic.php?p=2398745" rel="nofollow noreferrer">this</a> post on the hibernate forums saying to place:</p>
  
  <pre><code>&lt;sql-type jdbc-type="OTHER" hibernate-type="java.sql.Timestamp" /&gt;
  </code></pre>
  
  <p>in the <code>hibernate.reveng.xml</code> file.</p>
  
  <p>In Netbeans you are not able to generate the mappings from this file (it creates a new one every time) and it does not seem to have the ability to re-generate them from the file either (at least according to <a href="http://wiki.netbeans.org/ReverseEngineering" rel="nofollow noreferrer">this</a> it is slated to be available in version 7).</p>
  
  <p>So I am trying to figure out what to do. I am more inclined to believe I am doing something wrong since I am new to this, and it seems like it would be a common problem for others.</p>
  
  <ul>
  <li>So what am I doing wrong?</li>
  <li>If I am not doing anything wrong, how do I work around this?</li>
  </ul>
  
  <p>I am using Netbeans 6.5, Oracle 10G, and I believe Hibernate 3 (it came with my netbeans).</p>
  
  <p><strong>Edit:</strong> Meant to say I found <a href="https://stackoverflow.com/questions/2188768/java-type-for-date-time-when-using-oracle-date-with-hibernate">this</a> stackoverflow question, but it is really a different problem.</p>
  
  <p><strong>UPDATE:</strong>
  The oracle jdbc driver I was using (ojdbc14.jar) is 9.0.2.0.0
  I have now also tried:</p>
  
  <ul>
  <li>ojdbc14.jar version 10.2.0.4.0</li>
  <li>ojdbc6.jar version 11.2.0.1.0</li>
  </ul>