Not able to find ojdbc driver after adding it in the pom.xml file

Praveenks :

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.

enter image description here

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]

enter image description here

JF Meier :

Please note that mvnrepository has nothing to do with MavenCentral.

When you find an artifact there, it does not mean that Maven will find it in MavenCentral.

Instead, you need to figure out a repository from which you can get the desired jar and then add that repository to your <repositories>.

For the specific jar, this might be difficult, see here (as already suggested by Ben R.):

Find Oracle JDBC driver in Maven repository

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Missing artifact com.oracle:ojdbc6:jar:11.2.0 in pom.xml

location of pom.xml file

not able to find executable/binary file after "go build" command

Failure adding Spring HATEOAS to pom.xml

Missing artifact error when adding a dependency in pom.xml file

Adding ojdbc to maven project

Not able to find *.xml file under Intellij

Manually adding aar with dependency pom/iml file

IntelliJ does not find pom.xml file

Using `find` to find pom.xml file and do a maven build, ignoring nested POMs

TestNG not available in selenium after adding TestNG in maven dependency (pom.xml)

create loop to find dependencies in pom.xml file using python

After adding log4j property in ignite default config file, service not able to start

Heroku not recognize gradle - Could not find a pom.xml file

How apache.commons.lang3 is added to Jhipster external libraries without adding to pom.xml file?

Pom.xml is not able to send email?

System not able to find the specified file

Build Failed: unable to find ojdbc .jar file

Not able to login into Maximo Anywhere (work execution app) after adding new VIEW in app.xml

not able to execute mainClass from pom.xml

Spring Tool Suite Closes Automatically after adding dependency to pom.xml file

Python project not able to find file

Ojdbc driver error

Jenkins is not invoking the correct POM file after moving the source code to Gitlab if the pom is inside the multiple directory(A/B/C/pom.xml)

Error in pom.xml after adding the required jars

Maven pom.xml adding another project

Jar file not able to find the keystore

How to import @NotBlank after adding org.springframework.boot dependency in pom.xml

why can't Maven find the nd4j .jar file after adding the dependency to pom.xml?

TOP Ranking

  1. 1

    Failed to listen on localhost:8000 (reason: Cannot assign requested address)

  2. 2

    pump.io port in URL

  3. 3

    How to import an asset in swift using Bundle.main.path() in a react-native native module

  4. 4

    Loopback Error: connect ECONNREFUSED 127.0.0.1:3306 (MAMP)

  5. 5

    Compiler error CS0246 (type or namespace not found) on using Ninject in ASP.NET vNext

  6. 6

    BigQuery - concatenate ignoring NULL

  7. 7

    Spring Boot JPA PostgreSQL Web App - Internal Authentication Error

  8. 8

    ggplotly no applicable method for 'plotly_build' applied to an object of class "NULL" if statements

  9. 9

    ngClass error (Can't bind ngClass since it isn't a known property of div) in Angular 11.0.3

  10. 10

    How to remove the extra space from right in a webview?

  11. 11

    Change dd-mm-yyyy date format of dataframe date column to yyyy-mm-dd

  12. 12

    Jquery different data trapped from direct mousedown event and simulation via $(this).trigger('mousedown');

  13. 13

    maven-jaxb2-plugin cannot generate classes due to two declarations cause a collision in ObjectFactory class

  14. 14

    java.lang.NullPointerException: Cannot read the array length because "<local3>" is null

  15. 15

    How to use merge windows unallocated space into Ubuntu using GParted?

  16. 16

    flutter: dropdown item programmatically unselect problem

  17. 17

    Pandas - check if dataframe has negative value in any column

  18. 18

    Nuget add packages gives access denied errors

  19. 19

    Can't pre-populate phone number and message body in SMS link on iPhones when SMS app is not running in the background

  20. 20

    Generate random UUIDv4 with Elm

  21. 21

    Client secret not provided in request error with Keycloak

HotTag

Archive