

- #Add oracle jdbc jar to maven repository how to
- #Add oracle jdbc jar to maven repository install
- #Add oracle jdbc jar to maven repository driver
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 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),īut they seem to be encoded in ISO-8859-1 (Latin 1).
#Add oracle jdbc jar to maven repository driver
First download ojdbc jar file from Oracle JDBC Driver Website.
#Add oracle jdbc jar to maven repository how to
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 0圎2 0x80 0x9C and 0圎2 0x80 0x9D respectively. This example gives step by step introductions to add Oracle JDBC driver into your Maven local repository and also how to reference it into your pom.xml file.
#Add oracle jdbc jar to maven repository install
To use the Oracle JDBC driver with Maven, you have to download and install it into your Maven local repository manually. Trying to get the dependencies via Gradle versions 3.4.1 and 3.5 fails because the POM files for the following dependencies:Īre not valid UTF-8 files and fail the standard JDK (Oracle's 1.8.1_102) Xerces parser:Ĭom.MalformedByteSequenceException: Invalid byte 1 of 1-byte UTF-8 sequence.Īt .UTF8Reader.invalidByte(UTF8Reader.java:701)Īt .UTF8Reader.read(UTF8Reader.java:567)Īt .load(XMLEntityScanner.java:1896)Īt .skipChar(XMLEntityScanner.java:1551)Īt .$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2821)Īt .next(XMLDocumentScannerImpl.java:602)Īt .scanDocument(XMLDocumentFragmentScannerImpl.java:505)Īt .11Configuration.parse(XML11Configuration.java:841)Īt .11Configuration.parse(XML11Configuration.java:770)Īt .parse(XMLParser.java:141)Īt .parse(DOMParser.java:243)Īt .parse(DocumentBuilderImpl.java:339)Īt .parse(DocumentBuilder.java:205) Note Due to Oracle license restrictions, the Oracle JDBC driver is not available in the public Maven repository.

