Let me talk about the Hibernate configuration in oracle





<hibernate-configuration>
  <session-factory>
      <property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
      <property name="hibernate.connection.driver_class">oracle.jdbc.OracleDriver</property>
      <property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
      <property name="hibernate.connection.username">zhiweiv</property>
      <property name="hibernate.connection.password">zhiweiv</property>
  </session-factory>
</hibernate-configuration>





And talk about driver's jar file. I use the xe are oracle version 10g, however, and are the same, first of all, the use of official ojdbc14.jar, the test error. Added by others class12.jar. Tested or wrong, can not connect. Finally they said the driver used to use 11g. Official online download at a jdbc driver for oracle 11g test. File name ojdbc6.jar

Finally again a problem. Me because I used navicat to connect the oracle version of oracle, where he set up the tables and fields are all lower case letters (However, if the website provided by the use of xe management tools version of the table and field set up oracle will automatically put all the letters of all replaced by capital letters). But when I use Hibernate distributed Hibernate the sql statement oracle table names and field names will be changed to uppercase oracle, navicat If so pay attention to set up table and table field names must be explicit capital. Otherwise will be prompted to find or are unable to find the field.