FIX: Maven project adds a pom Oracle dependency

Source: Internet
Author: User

Foreword: The MAVEN project needs to add Oracle dependencies to the Pom file.

If error: The report can not find the driver; java.lang.ClassNotFoundException:oracle.jdbc.driver.OracleDriver. Here's a solution.

Solution :

    1. Find the Oracle JDBC Driver in the Oracle installation directory; for example: D:\Oracle\product\11.2.0\dbhome_1\jdbc\lib;
    2. Win+r start the console and switch to D:\Oracle\product\11.2.0\dbhome_1\jdbc\lib;
    3. Run: mvn install:install-file-dgroupid=com.oracle-dartifactid=ojdbc6-dversion=11.2.0.1.0-dpackaging=jar-dfile= Ojdbc6.jar
    4. Added in Pom.xml (this is not valid until added):
    <!--adding Oracle drivers to a MAVEN project -    <Dependency>      <groupId>Com.oracle</groupId>      <Artifactid>Ojdbc6</Artifactid>      <version>11.2.0.1.0</version>    </Dependency>

3rd Step after running the Success page:

FIX: Maven project adds a pom Oracle dependency

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.