This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Driver for Derby database" Watch "Driver for Derby database" New topic

Driver for Derby database

Vish hari

Joined: Jul 21, 2008
Posts: 20
Hi friens,

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

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.

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10745

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

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

Joined: Dec 20, 2006
Posts: 2543

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
I agree. Here's the link:
subject: Driver for Derby database
It's not a secret anymore!