Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ojdbc8 12.2.0.1 missing from Oracle maven repository?

TobiasGrMar 29 2017 — edited Apr 30 2017

Hi,

I tried to get the Oracle JDBC driver 12.2.0.1 from the Oracle Maven repository by adding the following to my pom.xml:

<dependency>

  <groupId>com.oracle.jdbc</groupId>

  <artifactId>ojdbc8</artifactId>

  <version>12.2.0.1</version>

</dependency>

but the artifact seems to be missing (404)... Am I doing something wrong?

Regards, Tobias

This post has been answered by Nirmala Sundarappa-Oracle on Mar 30 2017
Jump to Answer

Comments

unknown-7404

You can't get what isn't there. You'll have to wait until it is available.

TobiasGr

Well, obviously. It seems I was wrong in my assumption that software is pushed to all release channels on release (almost 4 month ago)...

I was just asking here since it seems some Oracle employees monitor this forum and I suspected someone could fix this oversight...

unknown-7404

Each Oracle group does their own release/distribution and things have to ripple down the chain. It is a lot of work to do the migration testing required before releases.

Once a group (e.g. JDBC) has a new 'release' candidate the other groups that also distribute that product can then put it on their integration/release schedule.

All you can do is open an SR with Oracle.

Answer

We are working on uploading the 12.2.0.1 JDBC driver and UCP on Oracle Maven repository.  We will update once they are available.

Thanks for you patience !!

Marked as Answer by TobiasGr · Sep 27 2020
Nirmala Sundarappa-Oracle

JDBC driver and UCP from Oracle Database 12c Release 2 (12.2.0.1) are available on Oracle Maven Repository. You can use the GAV details below to download the JDBC driver and UCP.

<dependency>

      <groupId>com.oracle.jdbc</groupId>

      <artifactId>ojdbc8</artifactId>

      <version>12.2.0.1</version>

    </dependency>

<dependency>

      <groupId>com.oracle.jdbc</groupId>

      <artifactId>ucp</artifactId>

      <version>12.2.0.1</version>

    </dependency>

Yaniv Kunda

Trying to get the dependencies via Gradle versions 3.4.1 and 3.5 fails because the POM files for the following dependencies:

  • com.oracle.jdbc:orai18n:12.2.0.1
  • com.oracle.jdbc:xmlparserv2:12.2.0.1
  • com.oracle.jdbc:xdb6:12.2.0.1
  • com.oracle.jdbc:oraclepki:12.2.0.1
  • com.oracle.jdbc:osdt_cert:12.2.0.1
  • com.oracle.jdbc:osdt_core:12.2.0.1
  • com.oracle.jdbc:ons:12.2.0.1

Are not valid UTF-8 files and fail the standard JDK (Oracle's 1.8.1_102) Xerces parser:

com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.

  at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:701)

  at com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:567)

  at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1896)

  at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipChar(XMLEntityScanner.java:1551)

  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2821)

  at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)

  at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)

  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)

  at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)

  at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)

  at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)

  at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)

  at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:205)

The root cause seems to be the encoding of these POM files in ISO-8859-1 instead of UTF-8 (which is declared in the XML header) - and using the 0x93/0x94 characters - left & right double quotation marks - which are not valid code points in UTF-8, where they should be 0xE2 0x80 0x9C and 0xE2 0x80 0x9D respectively.

Yaniv Kunda

The problem is not with downloading the files (I can download them too directly), but that these files should be UTF-8 encoded (as declared in the XML header),

but they seem to be encoded in ISO-8859-1 (Latin 1).

I don't know what Maven does with the downloaded POM files, but when Gradle downloads them, it parses them using the JDK standard XML Parser (Xerces) which fails since it tries to decode the character stream using UTF-8 encoding (which it should, as it is declared in the header).

The file needs to be stored on Oracle's maven server using the correct UTF-8 encoding.

Here is an example build.gradle reproducing the error:

plugins {

  id 'java'

  id 'distribution'

}

repositories {

  maven {

    url 'https://www.oracle.com/content/secure/maven/content'

    credentials {

      username 'username'

      password 'password'

    }

  }

}

dependencies {

  compile 'com.oracle.jdbc:ojdbc8:12.2.0.1'

}

distributions {

    main {

        contents {

            from configurations.compile

        }

  }

}

You can recreate it by replacing username/password with actual credentials and running:

gradle distZip

Or get a full stack-trace showing exactly where in Gradle's code this fails:

gradle distZip --stacktrace

Thanks for the additional details.  We are checking on this issue and will update once we resolve the issue. 

Nirmala Sundarappa-Oracle

When I tried with the command "gradle dependencies --configuration compile", I get the following error.  Can you let me know how you made this work?  I assume, you are able to download ojdbc8.jar but facing issues with other jars (ons.jar, orai18n.jar).  Is that correct ?

compile - Dependencies for source set 'main' (deprecated, use 'implementation ' instead).

\--- com.oracle.jdbc:ojdbc8:12.2.0.1 FAILED

Yaniv Kunda

You are right - and I did get that error for 12.2.0.1 but not for 12.1.0.2, so I thought it would be enough to help with the fix - but for some reason it does not show the actual root cause.

I edited my previous reply with a different Gradle build file and command to re-create the same error I got with our product.

Now it produces the following error for each of the dependencies I listed:

> Could not resolve com.oracle.jdbc:orai18n:12.2.0.1.

  Required by:

      project : > com.oracle.jdbc:ojdbc8:12.2.0.1

  > Could not resolve com.oracle.jdbc:orai18n:12.2.0.1.

      > Could not parse POM https://www.oracle.com/content/secure/maven/content/com/oracle/jdbc/orai18n/12.2.0.1/orai18n-12.2.0.1.pom

        > Invalid byte 1 of 1-byte UTF-8 sequence.

The problem could also be fixed by replacing the left & right double quotation marks characters with standard double quotes charaters, which are lower-ascii and have the same encoding in both UTF-8 and ISO-8859-1.

We have uploaded the new set of files fixing the UTF-8 character issue.  When I tested using Gradle, I was able to download ojdbc8.jar. Can you please check and let us know if your issues are solved ?

Yaniv Kunda

After clearing a few caches I was finally able to include the new dependencies in our build and watch them resolve successfully.

Thank you very much!

1 - 13
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 28 2017
Added on Mar 29 2017
13 comments
81,288 views