• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Loading JDBC Driver with Custom Class Loader

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am using a custom class loader to load jars. I am trying to load drivers using this custom class loader.
custmClassLoader.loadClass(driver).newInstance();
DriverManager.getDriver(url);
custmClassLoader.loadClass(driver).newInstance();
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.
Regards,
Praveen.
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
What I don't understand is how they changed the earth's orbit to fit the metric calendar. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic