This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DataSource and Driver Class loaded at runtime  RSS feed

 
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
Boost this thread!