I am trying to add ojdbc dependency in my pom.xml file to connect with Oracle database.
As shown below, this jar is available in maven repository.
But, after adding it pom.xml file, it's throwing below error. My settings are on auto import, so it should import it automatically.
Error:
com.oracle.ojdbc8.12.2.0.1.0 not found..
I am using Intellij IDEA and java version is 1.8.
Update:
After cleaning and compiling, I got to to know the actual root cause. My repository is set as below :
<repositories>
<repository>
<id>confluent</id>
<url>http://packages.confluent.io/maven/</url>
</repository>
</repositories>
So, it's trying to look for ojdbc driver in this repository and not able to find it(my guess). I can't remove the above repository as it is required for other dependency. So, I would like to know how can I force ojdbc dependency to look into maven instead of io.confluent repository. Do I have to set two repositories?
Error :
[ERROR] Failed to execute goal on project PaymentEngine: Could not resolve dependencies for project com.example.test:PaymentEngine:jar:1.0-SNAPSHOT: Failure to find com.oracle:ojdbc8:jar:12.2.0.1.0 in http://packages.confluent.io/maven/ was cached in the local repository, resolution will not be reattempted until the update interval of confluent has elapsed or updates are forced -> [Help 1]