File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes DataSource and Driver Class loaded at runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "DataSource and Driver Class loaded at runtime" Watch "DataSource and Driver Class loaded at runtime" New topic
Author

DataSource and Driver Class loaded at runtime

dav mrazek
Ranch Hand

Joined: Aug 11, 2007
Posts: 69
Hello i m loading the class for my jdbc driver at runtime. Once it is loaded how can i use it with the datasource or what is the way to go once it is loaded. I m having a ClassNotFoundException even after my class is loaded.
I m using commons DBCP BasicDataSource for the implementation of the datasource.
Thanks for helping.
dav mrazek
Ranch Hand

Joined: Aug 11, 2007
Posts: 69
Here is my code :

when i do cl.loadClass the class it s like if it was in the classpath no ?
Why Class.forName(driverClassName) wouldn't work after this ?
Thank you for helping.
dav mrazek
Ranch Hand

Joined: Aug 11, 2007
Posts: 69
Here is my code :

when i do cl.loadClass the class it s like if it was in the classpath no ?
Why Class.forName(driverClassName) wouldn't work after this ?
Thank you for helping.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: DataSource and Driver Class loaded at runtime