I am a beginner to Maven project. In my project, I am getting the error
Missing artifact com.oracle:ojdbc6:jar:11.2.0.3
, even though the jar was present in my repository at the correct folder. Can anyone help with this, please?

- 21,985
- 6
- 54
- 76

- 356
- 1
- 2
- 10
-
please share your `pom.xml` – Master Po May 29 '17 at 09:10
4 Answers
Unfortunately, due to the binary license, there is no public repository with the Oracle Driver JAR, so you cannot just add it to your pom file.
You have to add this jar manually:
First, you have to download ojdbc6.jar
from here
click jar (2.6 MB)
on the middle of the page.
Then put ojdbc6.jar
in some folder in your project (let's use lib
).
Then you have to add this in your dependencies
section in your pom.xml
:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>11.2.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/ojdbc6.jar</systemPath>
</dependency>
Another option is to install this jar in your local maven repository:
mvn install:install-file -Dfile=path/to/ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar
And then you will be able to reference this dependency like this:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>
You have to choose what's best for you.

- 6,242
- 6
- 43
- 58

- 21,985
- 6
- 54
- 76
-
1Alternatively if you run a local nexus installtion in your company you could use 'mvn deploy' to deploy the artifact to it so everybody in your team can use the artifact. I don't know whether the oracle license allows that, though. – DrHopfen May 29 '17 at 09:55
Remove the ojdbc6 folder from the .m2 repository completely and then maven update the project in enclipse that solved my problem

- 356
- 1
- 2
- 10
-
where is .m2 repository, i dont have maven installed locally. i have it on eclipse – Junaid Shirwani May 06 '19 at 22:55
-
-
This answer is now outdated as above https://stackoverflow.com/a/44238897/2940265 – Menuka Ishan May 17 '20 at 16:38
<repositories>
<repository>
<id>spring-releases</id>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
Should solve the issue if you are using spring boot

- 151
- 1
- 1
- 12
-
1This won't resolve the issue because now Oracle removed their dependencies from public repos to oracle one. You have to follow their guidelines unless you manually – Menuka Ishan May 17 '20 at 16:34
Once you face the issue . Check in your maven user settings path . This will be a path something like :
C:\Users\ user name\ .m2\repository
Open the location and go to oracle\ojdbc6\11.2.0.3 folder and put the .jar on that location .Return back to eclipse perform maven update and your issue will be gone.

- 117
- 1
- 3