Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataSource and Driver Class loaded at runtime

 
dav mrazek
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic