-
Bug
-
Resolution: Fixed
-
P1
-
1.2.0
-
1.2fcs
-
sparc
-
solaris_2.5.1, solaris_2.6
-
Verified
gordon.jackson@east 1998-08-05
The FCS-D build is unable to load 3rd-Party JDBC Drivers. This does not happen when running the tests against Beta4 (final). It seams to be in the DriverManager code.
Here is what the failure looks like using JDK1.2FCS-D:
**** Test Run Started Wed Aug 05 13:43:34 EDT 1998 ****
=======================================
Loading test module connection.NativeSQL
jdbcTest.connection.NativeSQL: Starting Module connection.NativeSQL -
jdbcTest.connection.NativeSQL: No resource file found for jdbcTest.connection.NativeSQL
DriverManager.getConnection("jdbc:oracle:oci7:@JDBCTEST")
DriverManager.initialize: jdbc.drivers = oracle.jdbc.driver.OracleDriver
DriverManager.Initialize: loading oracle.jdbc.driver.OracleDriver
registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@db4689bf]
JDBC DriverManager initialized
skipping: driver[className=oracle.jdbc.driver.OracleDriver,oracle.jdbc.driver.OracleDriver@db4689bf]
getConnection: no suitable driver
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(DriverManager.java:141)
at java.sql.DriverManager.getConnection(DriverManager.java:164)
at jdbcTest.connection.NativeSQL.run(NativeSQL.java:58)
at java.lang.Thread.run(Thread.java:475)
Here is what success looks like using JDK1.2Beta4:
**** Test Run Started Wed Aug 05 13:45:56 EDT 1998 ****
=======================================
Loading test module connection.NativeSQL
jdbcTest.connection.NativeSQL: Starting Module connection.NativeSQL -
jdbcTest.connection.NativeSQL: No resource file found for jdbcTest.connection.NativeSQL
DriverManager.getConnection("jdbc:oracle:oci7:@JDBCTEST")
DriverManager.initialize: jdbc.drivers = oracle.jdbc.driver.OracleDriver
DriverManager.Initialize: loading oracle.jdbc.driver.OracleDriver
registerDriver: driver[className=oracle.jdbc.driver.OracleDriver,context=null,oracle.jdbc.driver.OracleDriver@fe1a84f2]
JDBC DriverManager initialized
trying driver[className=oracle.jdbc.driver.OracleDriver,context=null,oracle.jdbc.driver.OracleDriver@fe1a84f2]
DBAccess.logon
As near as I can tell, the problem seems to originate in the DriverManager.getConnection() method. This has changed
since beta4. Here are the diffs: ( beta4 < > fcs-d )
103,104c103,105
< // Figure out the current security context.
< Object currentSecurityContext = getSecurityContext();
---
> // Get the classloader of the code that called this method, may
> // be null.
> ClassLoader callerCL = DriverManager.getCallerClassLoader();
111,114c112,115
< // if the driver isn't part of the base system and doesn't come
< // from the same security context as the current caller, skip it.
< if (di.securityContext != null &&
< di.securityContext != currentSecurityContext) {
---
>
> // If the caller does not have permission to load the driver then
> // skip it.
> if ( getCallerClass(callerCL, di.driverClassName ) != di.driverClass ) {
- duplicates
-
JDK-4163936 JDK1.2 fcs - Can not connect to Oracle database by using Oracle thin JDBC driver
-
- Closed
-