This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Loading JDBC Driver with Custom Class Loader Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Loading JDBC Driver with Custom Class Loader" Watch "Loading JDBC Driver with Custom Class Loader" New topic

Loading JDBC Driver with Custom Class Loader

Praveen Balaji
Ranch Hand

Joined: Jun 17, 2001
Posts: 60
I am using a custom class loader to load jars. I am trying to load drivers using this custom class loader.
registers the driver successfully.
The custmClassLoader object delegates the searches its repository and if the class is not found, delegates the work to the System Classloader (like Tomcat).
Any help on this will be greatly appreciated.
Col Bell

Joined: Mar 21, 2002
Posts: 12
java.sql.DriverManager doesn't handle JDBC drivers that are loaded from a custom classloader. To get around this I wrote my own driver manager. You can have a look at it here

Col<br /><a href="" target="_blank" rel="nofollow"></a>
subject: Loading JDBC Driver with Custom Class Loader
It's not a secret anymore!