This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Driver for Derby database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Driver for Derby database" Watch "Driver for Derby database" New topic
Author

Driver for Derby database

Vish hari
Greenhorn

Joined: Jul 21, 2008
Posts: 20
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

Joined: Jul 26, 2007
Posts: 10171
    
    8

Are all the required derby jars on your class path?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Vish hari
Greenhorn

Joined: Jul 21, 2008
Posts: 20
Yes, all the derby jars are in the build path.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2491
    
    8

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.


OCUP UML fundamental and ITIL foundation
youtube channel
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Driver for Derby database
 
Similar Threads
exception in login page using apache derby
apache derby
Derby Embedded vs. Derby Network Server
newbie J2EE Database Server question
Error loading derby driver