Oracle ojdbc8 12.2.0.1 Forbidden by Maven
Asked Answered
K

9

16

Oracle ojdbc8 12.2.0.1 Forbidden by Maven since December 2017, before that worked well. What configuration has changed on the Oracle repository (setting.xml)?

Maven project: https://github.com/sgrillon14/MavenSampleOracleJdbc

Full trace: https://travis-ci.org/sgrillon14/MavenSampleOracleJdbc

Keelin answered 4/1, 2018 at 13:16 Comment(2)
See here for a solution that works: #47005294Gallardo
@Ariel, this solution is Gradle but my question is on MavenEquerry
D
9

It's possible that the Oracle Maven terms have changed. You may need to re-register on the Oracle Maven site: http://www.oracle.com/webapps/maven/register/license.html I tried your github script and it worked fine with me:

$ mvn clean install --settings test/mvnsettings.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mavensampleoraclejdbc 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ mavensampleoraclejdbc ---
[INFO] Deleting /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ mavensampleoraclejdbc ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ mavensampleoraclejdbc ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ mavensampleoraclejdbc ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ mavensampleoraclejdbc ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ mavensampleoraclejdbc ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ mavensampleoraclejdbc ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ mavensampleoraclejdbc ---
[INFO] Installing /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar to /Users/jean/.m2/repository/com/github/sgrillon14/mavensampleoraclejdbc/1.0.0-SNAPSHOT/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar
[INFO] Installing /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/pom.xml to /Users/jean/.m2/repository/com/github/sgrillon14/mavensampleoraclejdbc/1.0.0-SNAPSHOT/mavensampleoraclejdbc-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.900 s
[INFO] Finished at: 2018-02-12T17:06:49+01:00
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
wagram:MavenSampleOracleJdbc-master jean$
Dorrie answered 12/2, 2018 at 16:11 Comment(1)
I reactivated my account (by mail) but the result is wrong. So, I create a new account and i have the same problem. What you check in Oracle account please?Equerry
A
21

This is from the Maven Central Repository. Please try with these maven settings in your pom file to pull from the Maven Repository. The Group Id is different.

<dependency>
    <groupId>com.oracle.database.jdbc</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>12.2.0.1</version>
</dependency>
    
Alta answered 28/9, 2020 at 10:11 Comment(4)
While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value.Shrier
@Shrier If you know how Maven works, no additional context is needed; this answer is self-explanatory. If you do not, a Maven tutorial is out of scope for an answer to this question. The answer is fine as is IMO.Transvestite
@Transvestite the answer is fine as is NOW, because it was edited after my post providing the more context that is helpful for long-term value.Shrier
Ah got it - good comment then!Transvestite
P
13
  1. Since Oracle JDBC Driver is not in Maven repository, Download ojdbc8.jar and run the below command.
mvn install:install-file -Dfile=/home/cm/Videos/ojdbc8.jar -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=12.1.0.2 -Dpackaging=jar
  1. Add this dependency in pom.xml
<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>12.1.0.2</version>
</dependency>
Pendleton answered 6/8, 2019 at 6:12 Comment(2)
do not work wiihout credentials in Maven setting.xml!!Equerry
you can find a sample hereEquerry
D
9

It's possible that the Oracle Maven terms have changed. You may need to re-register on the Oracle Maven site: http://www.oracle.com/webapps/maven/register/license.html I tried your github script and it worked fine with me:

$ mvn clean install --settings test/mvnsettings.xml
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mavensampleoraclejdbc 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ mavensampleoraclejdbc ---
[INFO] Deleting /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ mavensampleoraclejdbc ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ mavensampleoraclejdbc ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ mavensampleoraclejdbc ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ mavensampleoraclejdbc ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ mavensampleoraclejdbc ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ mavensampleoraclejdbc ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ mavensampleoraclejdbc ---
[INFO] Installing /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/target/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar to /Users/jean/.m2/repository/com/github/sgrillon14/mavensampleoraclejdbc/1.0.0-SNAPSHOT/mavensampleoraclejdbc-1.0.0-SNAPSHOT.jar
[INFO] Installing /Users/jean/Downloads/MavenOracle/MavenSampleOracleJdbc-master/pom.xml to /Users/jean/.m2/repository/com/github/sgrillon14/mavensampleoraclejdbc/1.0.0-SNAPSHOT/mavensampleoraclejdbc-1.0.0-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.900 s
[INFO] Finished at: 2018-02-12T17:06:49+01:00
[INFO] Final Memory: 12M/309M
[INFO] ------------------------------------------------------------------------
wagram:MavenSampleOracleJdbc-master jean$
Dorrie answered 12/2, 2018 at 16:11 Comment(1)
I reactivated my account (by mail) but the result is wrong. So, I create a new account and i have the same problem. What you check in Oracle account please?Equerry
E
5

Here's the underlying problem

Access denied to: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom , ReasonPhrase:Forbidden

I'm guessing you have the wrong username/password in your settings.xml. Try hitting the URL in your browser and enter the username/password. Possibly your credentials have expired? Or maybe you have a different settings.xml on travis than your localhost?

Endorsee answered 4/1, 2018 at 13:20 Comment(10)
I have this message since December 2017, before that worked well.: Unable to download '4002679'. User '[email protected]' does not have sufficient privileges to access the content account 'FMWMAVEN/FMWMAVENADMIN'. Back to previous pageEquerry
Guess you need to get a username/password that works. Perhaps your account expired? No ideaEndorsee
My username/password works on https://www.oracle.com/index.html Sign-InEquerry
Ok... but can you then hit https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom? If not I'm guessing your user, for whatever reason, no longer has the required priviledges to download the fileEndorsee
Or maybe oracle have removed the artifact and ReasonPhrase:Forbidden is just a poor description? Maybe try the latest version to see if that works?Endorsee
12.2.0.1 is the last version (I think)Equerry
ok... well... whatever the case... you need to get a url, username and password that works before your build will work. Does your company have it's own internal nexus repository? Perhaps you could install it there and reference from there?Endorsee
If it worked before an now fails the problem is on server side. I would recommend to ask in the Oracle Forums for assistance, may be the server is just down or something significant has changed.Quittor
This is my original question: what has Oracle changed in repository configuration since December 2017?Equerry
No idea... is there a way to seatch the repository at (maven.oracle.com)? I don't have a login... if you can find the artifact, you can find the new URLEndorsee
C
4

If you don't have dependency add it otherwise for oracle, replace it with the following code:

<dependency>
   <groupId>com.oracle.ojdbc</groupId>
   <artifactId>ojdbc8</artifactId>
   <version>19.3.0.0</version>
</dependency>
Colyer answered 23/10, 2019 at 16:1 Comment(0)
S
2

I tested for downloading ojdbc8.jar from 12.2.0.1. I was able to download without any issues. But, there is a warning. But, the warning is due to the missing *.md5 file in the maven repository. (We are looking into that issue)

Downloading: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom [WARNING] Checksum validation failed, expected 3626be7f20ea523d9fd6aca576d5aba3f7afb3fe but is f1be766b419370110b86bd088a69c1bfcdca6989 for https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom Downloaded: https://maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/ojdbc8-12.2.0.1.pom (7 KB at 0.4 KB/sec)

Spun answered 8/1, 2018 at 18:9 Comment(1)
This is because Oracle did something quite naughty... they altered the originally published POM without bumping the version number. That's why you get the checksum validation error when using Maven.Requiem
S
1

The Oracle Maven repository requires you to agree with the terms and conditions of using it. Thus, in order to provide this agreement:

  • go to Oracle.com and login
  • go to https://maven.oracle.com
  • the page shown shows:

    ... Directory browsing is not allowed on the Oracle Maven Repository.

    Registration is required to access the Oracle Maven Repository. To register, please visit the registration site. ...

The link to the "registration site" is actually http://www.oracle.com/webapps/maven/register/license.html

where you have to accept the terms and conditions. This allows you to use the Oracle Maven repository.

For further details on setting up Maven and published drivers, pleaase refer to

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

Saltation answered 11/6, 2018 at 9:56 Comment(0)
D
0

version in the MANIFEST is 12.2.0.1.0 not 12.2.0.1 but still the problem

"Content Server Request Failed Error Unable to download '(null)'. 'path:/Enterprise Libraries/content/maven/content/com/oracle/jdbc/ojdbc8/12.2.0.1/ojd‌​bc8-12.2.0.1.pom' does not exist. "

my credential are OK and got the problem on https://www.oracle.com/content/secure/maven/content/com/oracle/jdbc/ojdbc6/ojdbc6-11.2.0.4.0.pom (the URL you are redirected to when accessing to maven.oracle.com) too

FYI: Latest attempt this Sat 6/01/2018 morning: OK, was able to download ojdbc8 POM from a browser.

Dallis answered 5/1, 2018 at 20:32 Comment(3)
I try today with ojd‌​bc8-12.2.0.1.0 => artifact do not exist. I try today with ojd‌​bc8-12.2.0.1 => Access denied to: maven.oracle.com/com/oracle/jdbc/ojdbc8/12.2.0.1/… , ReasonPhrase:ForbiddenEquerry
indeed, random behavior…Dallis
Were you able to download the JDBC driver from oracle maven?Spun
M
0

This artifact was moved to: com.oracle.database.jdbc » ojdbc10

Mansur answered 18/12, 2020 at 3:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.