title: Mapping an Oracle Date to a Java object using Hibernate
body: <p>I get the message "literal does not match format string".</p>
  
  <p>For instance, here are some methods from a Java class:</p>
  
  <pre><code>public String getDateTime();
  public void setDateTime(String date_time);
  </code></pre>
  
  <p>Here is the mapping from the Hibernate config file for that class:  </p>
  
  <pre><code>&lt;property name="dateTime" column="date_time"&gt;
  </code></pre>
  
  <p>and here is the DDL for that column:</p>
  
  <pre><code> CREATE TABLE "SCHEMA"."TABLE_NAME" 
     (    
      "DATE_TIME" DATE, 
      etc.
     )
  </code></pre>
  
  <p>I tried setting type="date" and "timestamp" (not at the same time) as an attr on the property in the hibernate config, and then changing the Java type from String to Date, but that gave me a different error.  I read something about binding the parameter but couldn't make heads or tails of that.  </p>
  
  <p>When I comment out that property from the config everything else is working, so I'm sure that's my issue.  The annoying thing is that I have another table/class mapping with seemingly the same Oracle Date->Java String mapping that doesn't give me this problem.</p>