|Oracle ClassNotFound, where MySQL works fine [message #597323]
||Tue, 23 February 2010 18:25
| Mark Leone
Registered: July 2009
I have a MySQL driver and associated profile that's been working for months. I tried to implement Oracle in the same fashion, and I get a ClassNotFoundException for the Oracle driver.|
I do the following for both MySQL and Oracle drivers and connection profiles:
I contribute to org.eclipse.datatools.connectivity.driverExtension, overriding template org.eclipse.datatools.enablement.oracle.10.driverTemplate, and specifying a valuesProvider. The valuesProvider confirms existence of a url for ojdbc14.jar, which is wrapped by another plug-in. I verify in the debugger that the url is correct (it's a bundle-relative URL that points to the jar file in the top level directory of the Plug-in).
I then create a connection profile for the driver. When an attempt is made to open a connection, DTP Oracle enablement tries to load the driver class, and the class loader throws a ClassNotFoundException for.oracle.jdbc.OracleDriver.
It's a URLClassLoader that throws the exception. The URL is correct and points to the jar file where the class is present. I don't know what else I can do to specify where the class can be loaded from; and I don't know why the same code works fine with MySQL.
Powered by FUDForum
. Page generated in 0.01603 seconds