0

I am trying to develop spring boot application which will in back-end connect to oracle db. For oracle db connection I have added ojdbc6 driver dependency. I already have ojdbc6 jar in .m2 folder. But still I am getting compilation error in pom.xml for ojdbc6 dependency 'Missing artifact com.oracle:ojdbc6:jar:11.2.0.3'

As per solutions mentioned on various sites I tried to install ojdbc6 jar using following mvn command : mvn install:install-file -Dfile={Path/to/your/ojdbc.jar} -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar

But it failed saying artifact already exist:

jar installation error

Error in pom.xml:

1
  • Have you tried rebuilding the project and/or reimporting maven dependencies?
    – jny
    Jun 6, 2016 at 15:07

2 Answers 2

0

You can navigate to .m2 folder, find the path of repository/com/oracle/... and delete the content. then run the command again.

0

The following solution worked for me: Download the jar, rename it according to your dependency and paste in the repository folder. For example below path and the dependency:

<dependency>
            <groupId>com.ibm.db2.jcc</groupId>
            <artifactId>db2jcc4</artifactId>
            <version>10.1</version>
        </dependency>

C:\Users\Elias.m2\repository\com\ibm\db2\jcc\db2jcc4\10.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.