db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristian Waagan <Kristian.Waa...@Sun.COM>
Subject Re: java.sql.SQLException: No suitable driver found for jdbc:derby:jdbcDemoDB;create=true
Date Thu, 19 Nov 2009 09:29:21 GMT
Steve Morgan wrote:
> I just started using Derby. I am using NetBeans 6.7.1 with JDK 
> 1.6.0_17. I have included Derby.jar in my IDE libraries however the 
> system does not seem to be able to find the embedded driver. I cannot 
> find a library called "Embedded Driver". Can anyone see what I am 
> doing wrong? I have checked the FAQs to no avail.

Hi Steve,

I don't know what's wrong exactly. [1] describes how to work with a 
Derby database in general in NetBeans.
However, to use Derby in a project I think you have to add it as a 
library yourself and then add that library to the project. Simply adding 
derby.jar to the project should also work (but see my comment further 
down regarding the driver).

I know there was some changes / issues when going from 6.5 to 6.7, but I 
thought that was for the client driver only.

With Java SE 6 the driver would normally be auto-loaded, but I'm not 
sure if that happens in an IDE (i.e. due to classloader issues).
Are you already calling 
Class.forName("org.apache.derby.jdbc.EmbeddedDriver")* before you try to 
obtain the connection through DriverManager?

* You may want to add .newInstance() here. This is normally only 
required if the engine is unloaded by doing a Derby system shutdown.


[1] http://netbeans.org/kb/docs/ide/java-db.html
> Many thanks,
> Steve

View raw message