308

I want to add the oracle jdbc driver to my project as dependency (runtime scope) - ojdbc14. In MVNrepository site the dependency to put in the POM is:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc14</artifactId>
    <version>10.2.0.3.0</version>
</dependency>

of course this does't work as it is not in the central repository used by maven. 2 questions:

  1. How do I find a repository (if any) that contains this artifact?

  2. How do I add it so that Maven will use it?

MozenRath
  • 9,652
  • 13
  • 61
  • 104
rperez
  • 8,430
  • 11
  • 36
  • 44

21 Answers21

426

How do I find a repository (if any) that contains this artifact?

Unfortunately due the binary license there is no public repository with the Oracle Driver JAR. This happens with many dependencies but is not Maven's fault. If you happen to find a public repository containing the JAR you can be sure that is illegal.

How do I add it so that Maven will use it?

Some JARs that can't be added due to license reasons have a pom entry in the Maven Central repo. Just check it out, it contains the vendor's preferred Maven info:

<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.3.0</version>

...and the URL to download the file which in this case is http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html.

Once you've downloaded the JAR just add it to your computer repository with (note I pulled the groupId, artifactId and version from the POM):

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 \
     -Dversion=10.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc.jar -DgeneratePom=true

The last parameter for generating a POM will save you from pom.xml warnings

If your team has a local Maven repository this guide might be helpful to upload the JAR there.

victor hugo
  • 35,514
  • 12
  • 68
  • 79
  • @Victor - where do I locate these lines? in settings.xml? – Dejell Jul 14 '11 at 07:51
  • 1
    Those are not lines in settings.xml but a command, once you have the JAR that command will add it to your local repository – victor hugo Jul 14 '11 at 22:36
  • 15
    For OJDBC6: 1. mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true 2. Add this to pom.xml: com.oracle ojdbc6 11.2.0.3 – oskarae Dec 27 '11 at 16:06
  • 11
    I wander why Oracle is so ugly that it doesn't care of all public judgements it has. It is bad even in these small things like public availability of their own FREE libraries. – Askar Kalykov Apr 11 '14 at 07:51
  • Is there any chances to find source code for ojdbc14? – Alex May 20 '14 at 07:54
  • Hi @AskarKalykov There is a fundamental difference between "Free as in Beer" and "Free as in Freedom". See http://en.wikipedia.org/wiki/Gratis_versus_libre – Andrew Russell Jan 20 '15 at 02:47
  • Another way in Eclipse, add com.oracle ojdbc711.2.0 in pom.xml. This will create folders for this jar in .m2 folder (C:\Users\raz\.m2\repository\com\oracle\ojdbc7\11.2.0), copy the downloaded ojdbc7 jar , and rename it as ojdbc7-11.2.0.jar (artifactid-version) – Abdul Razak Jan 17 '17 at 09:46
  • I didn't test, but there is some article on dev2dev - https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides – Betlista Oct 12 '17 at 14:37
  • 8
    @AmanicA According to https://stackoverflow.com/a/27943380/7677308, Oracle now hosts such a repository – SilverNak Dec 28 '17 at 12:56
  • Appears a "few" versions are distributed these days: https://repo.maven.apache.org/maven2/com/oracle/ojdbc/ (or publish it to your own internal corporate maven repo, might not be a violation LOL) – rogerdpack Feb 04 '20 at 21:13
  • @rogerdpack, they have changed the group id and uploaded basically all versions of the driver since ojbc6. See [my answer](https://stackoverflow.com/a/60452253/664577) – Anthony Accioly Mar 02 '20 at 09:40
  • This answer is not accurate anymore, please see the updates of Stéphane GRILLONs answer – Ursin Brunner Jun 07 '21 at 21:59
  • Use regular Windows command prompt to run. PowerShell will throw errors. – Marcio J Aug 29 '22 at 16:44
61

The Oracle JDBC Driver is now available in the Oracle Maven Repository (not in Central).

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

The Oracle Maven Repository requires a user registration. Instructions can be found in:

https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides

Update 2019-10-03

I noticed Spring Boot is now using the Oracle JDBC Driver from Maven Central.

<dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>ojdbc10</artifactId>
    <version>19.3.0.0</version>
</dependency>

For Gradle users, use:

implementation 'com.oracle.ojdbc:ojdbc10:19.3.0.0'

There is no need for user registration.

Update 2020-03-02

Oracle is now publishing the drivers under the com.oracle.database group id. See Anthony Accioly answer for more information. Thanks Anthony.

Oracle JDBC Driver compatible with JDK6, JDK7, and JDK8

<dependency>
  <groupId>com.oracle.database.jdbc</groupId>
  <artifactId>ojdbc6</artifactId>
  <version>11.2.0.4</version>
</dependency>

Oracle JDBC Driver compatible with JDK8, JDK9, and JDK11

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

Oracle JDBC Driver compatible with JDK10 and JDK11

<dependency>
  <groupId>com.oracle.database.jdbc</groupId>
  <artifactId>ojdbc10</artifactId>
  <version>19.3.0.0</version>
</dependency>
Bienvenido David
  • 4,118
  • 1
  • 25
  • 16
53

For whatever reason, I could not get any of the above solutions to work. (Still can't.)

What I did instead was to include the jar in my project (blech) and then create a "system" dependency for it that indicates the path to the jar. It's probably not the RIGHT way to do it, but it does work. And it eliminates the need for the other developers on the team (or the guy setting up the build server) to put the jar in their local repositories.

UPDATE: This solution works for me when I run Hibernate Tools. It does NOT appear to work for building the WAR file, however. It doesn't include the ojdbc6.jar file in the target WAR file.

1) Create a directory called "lib" in the root of your project.

2) Copy the ojdbc6.jar file there (whatever the jar is called.)

3) Create a dependency that looks something like this:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc</artifactId>
    <version>14</version>
    <scope>system</scope>
    <systemPath>${basedir}/lib/ojdbc6.jar</systemPath> <!-- must match file name -->
</dependency>

Ugly, but works for me.

To include the files in the war file add the following to your pom

<build>
    <finalName>MyAppName</finalName>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <webResources>
                    <resource>
                        <directory>${basedir}/src/main/java</directory>
                        <targetPath>WEB-INF/classes</targetPath>
                        <includes>
                            <include>**/*.properties</include>
                            <include>**/*.xml</include>
                            <include>**/*.css</include>
                            <include>**/*.html</include>
                        </includes>
                    </resource>
                    <resource>
                        <directory>${basedir}/lib</directory>
                        <targetPath>WEB-INF/lib</targetPath>
                        <includes>
                            <include>**/*.jar</include>
                        </includes>
                    </resource>
                </webResources>
            </configuration>
        </plugin>

        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Marvo
  • 17,845
  • 8
  • 50
  • 74
  • 8
    I actually like this solution because it does not require setting up nexus, there are typically only 1 or 2 jars like this in a project, and it simplifies other developers setup on the project because they don't have to update their local .m2 env. (oracle being the prime candidate for this). Also, if you update your source repo with a new oracle jar, all developers get it on next pull. – Q Boiler Apr 09 '13 at 15:31
  • added info on how to add the jar files to the WAR file – ojblass Apr 02 '14 at 13:14
  • 1
    This worked for me - https://codingcraftsman.wordpress.com/2015/04/20/do-you-want-to-get-ms-sql-jdbc-driver-into-a-maven-war-build/ – Ashley Frieze Apr 20 '15 at 10:38
  • 1
    @Marvo, I tried many solutions and this was the best one, thanks a lot – Mahmoud Saleh Dec 18 '17 at 20:29
31

Download the jar and place it in your project src/lib. Now you can use the maven installer plugin.

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-install-plugin</artifactId>
    <version>2.3.1</version>
    <executions>
        <execution>
            <id>install-oracle-jdbc</id>
            <goals>
                <goal>install-file</goal>
            </goals>
            <phase>clean</phase>
            <configuration>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc6</artifactId>
                <version>11.2.0</version>
                <packaging>jar</packaging>
                <generatePom>true</generatePom>
                <createChecksum>true</createChecksum>
                <file>${project.basedir}/src/lib/ojdbc6.jar</file>
            </configuration>
        </execution>
    </executions>
</plugin>

Now you only have to execute mvn clean once and the oracle lib is installed in your local maven repository.

Stephan
  • 41,764
  • 65
  • 238
  • 329
Peter Enis
  • 335
  • 3
  • 4
21

Oracle is now exposing a maven repository at maven.oracle.com However you need to be authenticated.

See https://blogs.oracle.com/WebLogicServer/entry/weblogic_server_and_the_oracle

According to the comments in the blog post the ojdbc driver should be available at the following coordinates:

<groupId>com.oracle.weblogic</groupId>
 <artifactId>ojdbc7</artifactId>
 <version>12.1.3-0-0</version>
 <packaging>jar</packaging>
Sebastien
  • 5,506
  • 4
  • 27
  • 37
  • 7
    This does work. It's a bit of a hassle. You have to make sure you get the right artifact, create a Oracle account, add a few things to settings.xml and your pom.xml file and add a username and password for that account to settings.xml. Oracle needs to fix their licensing because this is still a PITA. – ggb667 Mar 05 '15 at 19:35
  • 13
    Require authentication to get maven artifacts sounds ridiculous. – Rafael Soares - tuelho Apr 14 '15 at 15:56
  • 3
    If you must for some reason use ojdbc6 (i.e. you are stuck on Java 6), then change the artifactId to ojdbc6 **and** change the version to 12.1.2-0-0. – dcsohl May 14 '15 at 18:03
  • I'm trying to find 11g release (11.2.0.4) for java 6... has anyone found ? – jpfreire Jun 15 '16 at 16:18
  • 2
    *Update* : Nailed it: for older jdbc drivers, you must also change groupId: mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -DrepoUrl=https://maven.oracle.com -Dartifact=com.oracle.jdbc:ojdbc6:11.2.0.4 – jpfreire Jun 15 '16 at 16:33
16

Try with:

<repositories>
    <!-- Repository for ORACLE ojdbc6. -->
    <repository>
        <id>codelds</id>
        <url>https://code.lds.org/nexus/content/groups/main-repo</url>
    </repository>
</repositories>
<dependencies> 
    <dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc6</artifactId>
        <version>11.2.0.3</version>
    </dependency>
</dependencies> 
ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
searching9x
  • 1,515
  • 16
  • 16
  • 14
    Except that this is a violation of the Oracle license. – Ben L. Apr 18 '15 at 02:47
  • 3
    Violence of the license, but works. I use it for educational purposes (not in production). It also holds the 12c driver com.oracle ojdbc7 12.1.0.2 – Svetlin Nakov Aug 19 '16 at 17:34
  • 4
    In addition to the licensing issue, **you shouldn't add unknown repositories in your pom**. This presents a **security risk** and could also threaten your build. How much trust can you put in a repository from _The Church of Jesus Christ of Latter-day Saints_? What guarantees do they provide that the repository is reliable, safe and secure, and that they won't mess with it? What happens if they get hacked and publish a malicious version of the ojdbc driver, or any other of your dependencies? – Didier L Feb 27 '18 at 16:28
13

1. How do I find a repository (if any) that contains this artifact?

As DavidS has commented the line I quoted at the time I answered is no longer present in the current (at the time I'm writing now) OTN License Agreement agreement I linked. Consider this answer only for older version of the artifact, as the 10.2.0.3.0 and the like.

All Oracle Database JDBC Drivers are distribuited under the OTN License Agreement.

If you read the OTN License Agreement you find this license term:

You may not:
...
- distribute the programs unless accompanied with your applications;
...

so that's why you can't find the driver's jar in any public Maven Repository, because it would be distributed alone, and if it happened it would be a license violation.

Adding the dependency:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc14</artifactId>
    <version>10.2.0.3.0</version>
</dependency>

(or any later version) make Maven downloads the ojdbc14-10.2.0.3.0.pom only, and in that pom you can read:

...
<licenses>
    <license>
        <name>Oracle Technology Network Development and Distribution License Terms</name>
        <url>http://www.oracle.com/technology/software/htdocs/distlic.html</url>
    </license>
</licenses>
...

which informs you about the OTN License.

2. How do I add it so that Maven will use it?

In order to make the above dependency works I agree with victor hugo who were suggesting you here to manually install the jar into your local Maven repository (the .m2 directory) by running:

mvn install:install-file -Dfile={Path_to_your_ojdbc.jar} -DgroupId=com.oracle 
-DartifactId=ojdbc -Dversion=10.2.0.3.0 -Dpackaging=jar

but I want to add that the license term above doesn't limit only where you can't find the JDBC jar, but it limits where you install it too!

In fact your local Maven repository must be private and not shared because if it was shared it would be a kind of distribution in which the jar is distributed alone, even if to a little group of people into your local area network, and this represent a OTN License Agreement violation.

Moreover I think you should avoid installing the JDBC jar in your corporation repository manager (such as Artifactory or Nexus) as a single artifact because if it was installed it would be still distributed alone, even if to people in your organization only, and this represents a OTN License Agreement violation.

taringamberini
  • 2,719
  • 21
  • 29
  • 1
    Notably, the line you quote is no longer present in the agreement you linked. The closest line remaining is, I think, "We grant You a nonexclusive, nontransferable right to copy and distribute unmodified Programs and Programs Documentation as part of and included in Your application that is intended to interoperate with the Associated Product, if any, provided that You do not charge Your end users any additional fees for the use of the Programs", which is as you can see is more concerned with _payment_ than it is the specifics of redistribution. – DavidS Jun 19 '19 at 23:37
12

You can use Nexus to manage 3rd party dependencies as well as dependencies in standard maven repositories.

Michael Munsey
  • 3,740
  • 1
  • 25
  • 15
  • 4
    How would nexus help in this case? Where will it download the artifact from? – ziggy Jan 12 '12 at 16:15
  • 4
    The answer is incomplete, but I *think* @Michael Munsey is saying to create an internal/corporate repository to download from. – Randolph May 10 '12 at 22:19
  • Yes. Set up Nexus, then manually download the jars and put them into Nexus so that successive maven builds can pull it from your Nexus instance. – Michael Munsey Aug 19 '13 at 23:24
  • 1
    @MichaelMunsey Generally speaking suggesting a repository manager like [Artifactory](http://www.jfrog.com/home/v_artifactory_opensource_overview) or [Nexus](http://www.sonatype.org/nexus/) would be a good answer, but in the specific case of Oracle JDBC database drivers, it isn't a good one because, even if it makes things work, it unfortunately expose you to trouble due to [this license term violation](http://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository/23723203#23723203). – taringamberini May 19 '14 at 07:14
11

As of today (27, February 2020) Oracle announced that it has published all JDBC client libraries from version 11.2.0.4 (e.g. ojdbc6) to 19.3.0 (e.g. ojdbc10) on Maven Central under the group id com.oracle.database:

Example:

<dependency>
  <groupId>com.oracle.database.jdbc</groupId>
  <artifactId>ojdbc10</artifactId>
  <version>19.3.0.0</version>
</dependency>
Anthony Accioly
  • 21,918
  • 9
  • 70
  • 118
5

The Oracle JDBC drivers are now available in Maven Central. Here is the Link:

Oracle JDBC Drivers - Maven Central

Oracle developers article announcing the availability of the Oracle JDBC drivers in Maven Central:

Oracle announcing - Oracle JDBC drivers available in Maven Central

Example:

<!-- https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc10 -->
<dependency>
   <groupId>com.oracle.database.jdbc</groupId>
   <artifactId>ojdbc10</artifactId>
   <version>19.3.0.0</version>
</dependency>
Alboz
  • 1,833
  • 20
  • 29
5

Up to now, its not possible to use maven repositories. I'm using ivy as dependency management tool, but also use maven2' s ibiblio repositories. And this is working for ivy:

<dependency org="oracle" name="ojdbc14" rev="10.2.0.2" conf="*->default"/>

Maven2' s dependency could be something like that:

<dependency> 
    <groupId>oracle</groupId> 
    <artifactId>ojdbc14</artifactId> 
    <version>10.2.0.2</version> 
</dependency>

Notice that i define http://download.java.net/maven/2/ and http://mirrors.ibiblio.org/pub/mirrors/maven/mule/dependencies/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext] as external maven2 repos on my ivy settings.

Betlista
  • 10,327
  • 13
  • 69
  • 110
tugcem
  • 1,078
  • 3
  • 14
  • 25
  • 1
    This is a great answer - you can just add the repo: http://mirrors.ibiblio.org/pub/mirrors/maven/mule/dependencies/maven2 to your pom.xml for this to work. – Grouchal Jan 03 '12 at 09:18
  • 7
    It might work, but is it legal? As explained in one of the other answers here, Oracle doesn't allow the driver to be distributed by anybody but them and they don't supply a Maven repository. If you use this solution, sometime the driver may be removed from the repository when you least expect it. – Mr. Lance E Sloan Apr 10 '12 at 15:50
  • 1
    @Grouchal This answer makes things work but, unfortunately, expose you to trouble due to [this license term violation](http://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository/23723203#23723203). – taringamberini May 19 '14 at 07:08
  • @Grouchal ... there is no `http://maven.ibiblio.org/maven/oracle` nor `http://maven.ibiblio.org/maven/com.oracle`. – david Mar 21 '17 at 12:44
2

Good news everyone! Finally we can use Oracle's official repo: https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides

Nirmala
  • 1,278
  • 1
  • 10
  • 11
Vladimir Chervanev
  • 1,574
  • 1
  • 12
  • 14
  • 4
    Good news, but the security settings are too complex. It is easier to download the JAR in the "lib" folder like we did in 1999. – Svetlin Nakov Aug 19 '16 at 17:36
  • it works! The security setup is not so complex and it's well documented, you have to do it only once. Surely the fact that you have to hardcode your (encrypted) password somewhere is a pain, I also question Oracle decision to "protect" the access to their "public" repository, it makes strictly no sense from a developer perspective. – Pierluigi Vernetto Oct 28 '17 at 11:52
1

In my case it works for me after adding this below version dependency(10.2.0.4). After adding this version 10.2.0.3.0 it doesn't work due to .jar file not avail in repository path.

<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4</version>
anand krish
  • 4,281
  • 4
  • 44
  • 47
0

I ship opensource under LGPLv2 and even after several email conversations with Oracle they were unclear whether I was allowed to ship their binary JDBC driver with my distribution. The issue related to whether my license was compatible with their OTN terms so they suggested I was not permitted to ship the driver. Presumably related to this part

(b) to distribute the programs with applications you have developed to your customers provided that each such licensee agrees to license terms consistent with the terms of this Agreement

So even if you manage to publish the driver legally in your exclusive/local maven repository there is still the restriction on what you are permitted to do with that artifact. Seems absurd that even if I ship their driver in binary form along with the full OTN license file I still can't use it and must force my users to manually download the Oracle driver and drop into my library path before they can use my software.

Craig
  • 1,383
  • 12
  • 9
-1

There is one repo that provides the jar. In SBT add a resolver similar to this: "oracle driver repo" at "http://dist.codehaus.org/mule/dependencies/maven2"

and a dependency: "oracle" % "ojdbc14" % "10.2.0.2"

You can do the same with maven. pom.xml and jar are available (http://dist.codehaus.org/mule/dependencies/maven2/oracle/ojdbc14/10.2.0.2/).

yǝsʞǝla
  • 16,272
  • 2
  • 44
  • 65
  • Be careful because this pom [http://dist.codehaus.org/mule/dependencies/maven2/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom](http://dist.codehaus.org/mule/dependencies/maven2/oracle/ojdbc14/10.2.0.2/ojdbc14-10.2.0.2.pom) has no license definition, so I don't think it was uploaded by the artifact owner. This answer makes things work but, unfortunately, expose you to trouble due to [this license term violation](http://stackoverflow.com/questions/1074869/find-oracle-jdbc-driver-in-maven-repository/23723203#23723203). – taringamberini May 19 '14 at 08:32
-1

If you are using Netbeans, goto Dependencies and manually install artifact. Locate your downloaded .jar file and its done. clean build will solve any issues.

Zafrullah Syed
  • 1,170
  • 2
  • 15
  • 38
-1

You can find a Github simple sample project for use a Oracle JDBC Driver on Maven Project here.

You can find all explication for your continous integration + a sample and run on Travis-CI.

DEMO

pom.xml

<properties>
    <oracle.driver.version>12.2.0.1</oracle.driver.version>
</properties>

<repositories>
    <repository>
        <id>maven.oracle.com</id>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <url>https://maven.oracle.com</url>
        <layout>default</layout>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>maven.oracle.com</id>
        <url>https://maven.oracle.com</url>
    </pluginRepository>
</pluginRepositories>

<dependencies>
    <dependency>
        <groupId>com.oracle.jdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>${oracle.driver.version}</version>
    </dependency>
</dependencies>

mvnsettings.xml

<settings>
    <servers>
        <server>
            <id>maven.oracle.com</id>
            <username>${OTN_USERNAME}</username>
            <password>${OTN_PASSWORD}</password>
            <configuration>
                <basicAuthScope>
                    <host>ANY</host>
                    <port>ANY</port>
                    <realm>OAM 11g</realm>
                </basicAuthScope>
                <httpConfiguration>
                    <all>
                        <params>
                            <property>
                                <name>http.protocol.allow-circular-redirects</name>
                                <value>%b,true</value>
                            </property>
                        </params>
                    </all>
                </httpConfiguration>
            </configuration>
        </server>
    </servers>
</settings>

How to use on local environment

change ${OTN_USERNAME} by your Oracle login in test/mvnsettings.xml file

change ${OTN_PASSWORD} by your Oracle password in test/mvnsettings.xml file

mvn clean install --settings test/mvnsettings.xml
Stéphane GRILLON
  • 11,140
  • 10
  • 85
  • 154
  • 2
    Your profile indicates you're associated with the website to which you have linked. Linking to something you're affiliated with (e.g. a product or website) without disclosing it's yours is considered spam on Stack Exchange/Stack Overflow. See: [**What signifies "Good" self promotion?**](//meta.stackexchange.com/q/182212), [some tips and advice about self-promotion](/help/promotion), [What is the exact definition of "spam" for Stack Overflow?](https://stackoverflow.com/q/260638), and [What makes something spam](https://meta.stackexchange.com/a/58035). – Samuel Liew Oct 04 '18 at 09:42
  • Samuel (a site moderator) is using canned comments to warn you about self-promotion, there's nothing wrong with it. – Jean-François Fabre Apr 22 '21 at 21:54
  • @Jean-FrançoisFabre, it is not self-promotion, it is an example project that I made especially to answer the question. In a lot of answer there is a link to a complete example especially in javascript/html/css to https://codepen.io – Stéphane GRILLON Apr 23 '21 at 07:05
  • okay, then read Samuel message, you'll see that you just need to _disclose_ your affiliation, then it's okay. – Jean-François Fabre Apr 23 '21 at 07:28
-1

Please try below:

<dependency>
    <groupId>com.oracle.ojdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>19.3.0.0</version>
</dependency>
Sunny
  • 89
  • 1
  • 9
-1

This worked for me like charm. I went through multiple ways but then this helped me. Make sure you follow each step and name the XML files exactly same.

https://blogs.oracle.com/dev2dev/get-oracle-jdbc-drivers-and-ucp-from-oracle-maven-repository-without-ides

The process is a little tedious but yes it does work.

Sudoss
  • 347
  • 2
  • 13
-2

For dependency

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

Try

<repository>
    <id>mvnrepository</id>
    <url>http://nexus.saas.hand-china.com/content/repositories/rdc</url>
</repository>
bosco1
  • 51
  • 1
  • 9
-3

SOLVED

  • Please do following settings to resolve the error

This repository needs to be enable for finding Oracle 10.0.3.0 dependecies (this setting needs to be done in Buildconfig.groovy grails.project.dependency.resolver = "ivy" // or ivy

Also use following setting for compile time Oracle driver download

runtime "com.oracle:ojdbc:10.2.0.3.0"

This should solve your issue for not finding the Oracle driver for grails application