on 03-05-2019 7:14 PM
When having Sybase (from jconn4.jar) and Oracle (from ojdbc8.jar) in the classpath, where jconn4.jar shows up before the ojdbc8.jar in the classpath, the initialization (registration) of the jdbc drivers fail, but when ojdbc8.jar shows up before jconn4.jar, it works fine.
Test harness attached (TestDriverLoad.java, attached as TestDriverLoad.txt)testdriverload.txt
Jar files in subdirectory jars (commons-dbcp-1.4.jar, commons-pool-1.5.4.jar, jconn4.jar, ojdbc8.jar).
JVM Version:
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
To compile:
javac -cp jars/commons-dbcp-1.4.jar:jars/commons-pool-1.5.4.jar TestDriverLoad.java
To run (unsuccessfully):
java -cp .:jars/jconn4.jar:jars/ojdbc8.jar:jars/commons-dbcp-1.4.jar:jars/commons-pool-1.5.4.jar TestDriverLoad createBasicDataSource
To run (successfully) (notice the order of the jars in the classpath):
java -cp .:jars/ojdbc8.jar:jars/jconn4.jar:jars/commons-dbcp-1.4.jar:jars/commons-pool-1.5.4.jar TestDriverLoad createBasicDataSource
Error output attached (errors.txt)errors.txt
What are my options other than ordering the jars in the classpath ?
Hi,
KBA# 2827462
https://launchpad.support.sap.com/#/notes/2827462
Regards,
Ryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am facing this exact issue, i am using the latest odbc11 jar and the latest version of jconn jar, please say work round for this issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I would check the versions of drivers you are using.
See a few items where older versions cause issues:
https://stackoverflow.com/questions/53790147/java-lang-noclassdeffounderror-could-not-initialize-cla...
SAP driver version:
java -jar jconn4.jar
Regards,
Ryan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oracle driver (the latest that I could find):
java -jar ojdbc8.jar
Oracle 18.3.0.0.0 JDBC 4.2 compiled with javac 1.8.0_171 on Tue_Jun_26_11:06:40_PDT_2018
#Default Connection Properties Resource
#Mon Mar 11 09:12:54 EDT 2019
***** JCE UNLIMITED STRENGTH IS INSTALLED ****
Sybase driver (also the latest that I could find from latest SDK):
java -jar jconn4.jar
jConnect (TM) for JDBC(TM)/16.0 SP02 PL07 (Build 27363)/P/EBF27657/JDK 1.6.0/jdbcmain/OPT/Tue Sep 26 18:50:13 PDT 2017
Confidential property of SAP AG or an SAP affiliate company.
Copyright (c) 2013
SAP AG or an SAP affiliate company.All rights reserved.
Unpublished rights reserved under U.S. copyright laws.
This software contains confidential and trade secret information of SAP AG or
an SAP affiliate company. Use, duplication or disclosure of the software and
documentation by theU.S.Governmentissubjecttorestrictions set forth in
a license agreementbetweentheGovernmentand SAP AG or an SAP affiliate
company,orotherwritten agreementspecifyingtheGovernment's rights to
use the software and any applicable FAR provisions, for example, FAR 52.227-19.
SAP AG or an SAP affiliate company
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.