Missing artifact com.oracle:ojdbc7 in eclipse

Masih picture Masih · Aug 14, 2015 · Viewed 39.6k times · Source

I have imported a Maven Project in Eclipse (EE Developer) and I have in my pom.xml file the following error, “Missing artifact com.oracle:ojdbc7:jar:12.1.0.2″ in this code:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc7</artifactId>
    <version>12.1.0.2</version>
</dependency>

I have done so by downloading the ojdbc7.jar and run this command:

mvn install:install-file -Dfile=/Path-to-jar/ojdbc7.jar
-DgroupId=com.oracle 
-DartifactId=ojdbc7 
-Dversion=12.1.0.2 
-Dpackaging=jar 
-DgeneratePom=true

After that, I got as an output BUILD SUCCESS, and if I go to the .m2 folder I see in the com->oracle->ojdbc7 two files called “ojdbc7-12.1.0.1.jar.lastUpdated” and “ojdbc7-12.1.0.1.pom.lastUpdated” but still Eclipse brings me the code into the pom.xml file as an error?!?!?! Can some one help?

Answer

Ramzi Kileni Jrad picture Ramzi Kileni Jrad · Jun 22, 2020

This artifact version (12.1.0.2) has been removed to an another dependency.

See: https://mvnrepository.com/artifact/com.oracle/ojdbc7

Try to change the new dependency:

<dependency>
    <groupId>com.oracle.database.jdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>12.2.0.1</version>
</dependency>