title: Unable to connect to database when oracle driver is added to Maven repository
body: <p>I am trying to write a simple webservice which reads/writes info to a database. I figure the oracle driver <code>ojdbc6</code> cannot be added as a dependency in pom.xml, so I added it using the below mvn install command.</p>
  
  <pre><code>mvn install:install-file -Dfile=C:\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
  </code></pre>
  
  <p><code>ojdbc6.jar</code> got added successfully
  [<code>ojdbc6.jar</code>][1]</p>
  
  <p>My DAO class trying to retrieve product info from database:</p>
  
  <pre><code>    package com.nt.dao;
  
  import org.hibernate.SessionFactory;
  import org.hibernate.Transaction;
  import org.hibernate.cfg.Configuration;
  import org.hibernate.classic.Session;
  
  import com.nt.dto.ProductDTO;
  
  public class ProductServiceDAO {
  
      public ProductDTO getProductInfo(long productId) {
          System.out.println("session---------1-");
          SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
          System.out.println("session---------2-");
          Session session = sessionFactory.openSession();
          ProductDTO productDTO = new ProductDTO();
          productDTO.setProductName("Apple");
          Transaction transaction = session.beginTransaction();
          System.out.println("session---------3-");
          productDTO = (ProductDTO) session.get(ProductDTO.class, productId);
          session.close();
          return productDTO;
      }
  }
  </code></pre>
  
  <p>When I try to run the program, I received below exception. Please help.</p>
  
  <pre><code> Caused by: org.hibernate.exception.JDBCConnectionException: Cannot open connection
  
  at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:99)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
  at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
  at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449)
  at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
  at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:160)
  at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:81)
  at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1473)
  at com.nt.dao.ProductServiceDAO.getProductInfo(ProductServiceDAO.java:17)
  at com.nt.bo.ProductServiceBO.getProductInfo(ProductServiceBO.java:10)
  at com.nt.ws.impl.ProductServiceImpl.getProductInfo(ProductServiceImpl.java:12)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
  at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
  ... 40 more
  Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1521:orcl
  at java.sql.DriverManager.getConnection(DriverManager.java:689)
  at java.sql.DriverManager.getConnection(DriverManager.java:208)
  at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:133)
  at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
  ... 53 more
  </code></pre>