Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Oracle ClassNotFound, where MySQL works fine
Oracle ClassNotFound, where MySQL works fine [message #597323] Tue, 23 February 2010 23:25 Go to next message
Mark Leone is currently offline Mark LeoneFriend
Messages: 123
Registered: July 2009
Senior Member
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.
Re: Oracle ClassNotFound, where MySQL works fine [message #597334 is a reply to message #597323] Wed, 24 February 2010 17:28 Go to previous message
Mark Leone is currently offline Mark LeoneFriend
Messages: 123
Registered: July 2009
Senior Member
I stepped through the edbugger on URLClassLoader and discovered that eclipse was holding on to an old version of my target directory, which didn't have the Oracle driver jar plug-in. I cleared the workspace, and both connections are working.
Previous Topic:Oracle ClassNotFound, where MySQL works fine
Next Topic:Derby DB creation issue
Goto Forum:
  


Current Time: Sun Dec 21 11:37:04 GMT 2014

Powered by FUDForum. Page generated in 0.01774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software