title: Configuring Hibernate persistence.xml with Oracle Database
body: <p>Im trying to configure persistence.xml file which is needed for my EntityManagerFactory. I have created persistence file for MySQL DB a few months ago. But I have a little trouble with Oracle DB. </p>
  
  <p>In MySQL connection I needed MySQL JDBC Connector. It is in Maven repository, so it was easy to fetch it and use. My problem is that I dont know which connector I have to use for connection to Oracle DB. Is that connector in Maven Repository?</p>
  
  <p>Here is my present persistence.xml</p>
  
  <pre><code>&lt;persistence xmlns="http://java.sun.com/xml/ns/persistence"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
               version="2.0"&gt;
  
     &lt;persistence-unit name="oracleTest" transaction-type="RESOURCE_LOCAL"&gt;   
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver" /&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:xe" /&gt;
              &lt;property name="javax.persistence.jdbc.user" value="library" /&gt;
              &lt;property name="javax.persistence.jdbc.password" value="" /&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect" /&gt;
              &lt;property name="hibernate.hbm2ddl.auto" value="create-drop" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>