0

Hi am using spring/hibernate. My database is oracle11g. To connect to oracle we need jdbc driver. i have below maven dependencies.

<dependency>
    <groupId>oracle</groupId>
    <artifactId>ojdbc</artifactId>
    <version>1.4</version>
 </dependency>


 <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0</version>
   </dependency>


   <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>11.2.0.3.0</version>
   </dependency>

Please suggest me which one to use and the difference amongst them?

Thanks!

user755806
  • 6,565
  • 27
  • 106
  • 153

2 Answers2

0

You can use a tool called "CodePro" and try "Analyse Dependencies" feature, it will give you all the dependencies used so that you know dependencies are not referenced(you can remove them).

Hope it helps.

Ashish
  • 735
  • 1
  • 6
  • 15
0

This page gives you information about the drivers available for oracle 11g http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

so among the dependencies you mention in your question, this one seems to be the most appropriate if you are using jdk 1.6

   <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0</version>
   </dependency>

but depending on your version of oracle, you'll use a specific version of the driver

  • 11.2.0.4
  • 11.2.0.3
  • 11.2.0.2
  • 11.2.0.1
Frederic Close
  • 9,389
  • 6
  • 56
  • 67