Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Driver for Derby database

 
Vish hari
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friens,

I have a java application which connects to derby database.
I have written the following code.

Class.forName("org.apache.derby.jdbc.ClientDriver");
Connection con = DriverManager.getConnection("jdbc:derby:myDB","user","pwd");

While executing I am getting 'Errororg.apache.derby.jdbc.ClientDriver'.
If I try to print the drivers error comes as 'no suitable driver'.

Please revert back to me if you know the solution.

Thanks,
Vishnuvardhan
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are all the required derby jars on your class path?
 
Vish hari
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, all the derby jars are in the build path.
 
Jan Cumps
Bartender
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vish hari:
Yes, all the derby jars are in the build path.

The build path is not relevant when running Java code, it is when compiling your sources.
The jars should be in your execution path when running the code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic