This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JDBC and the fly likes DataSource and Driver Class loaded at runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: DataSource and Driver Class loaded at runtime
 
Similar Threads
Database connection
class load time
how to get Driver location from datasource at runtime?
What is meant by LOADING DRIVER CLASS and RIGESTERING DRIVER CLASS
Class loading