You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Steve Morgan <st...@morganz.com> on 2009/11/18 22:20:14 UTC

java.sql.SQLException: No suitable driver found for jdbc:derby:jdbcDemoDB;create=true

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.
Many thanks,
Steve

Re: java.sql.SQLException: No suitable driver found for jdbc:derby:jdbcDemoDB;create=true

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> 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

EmbeddedDriver is not a library, it is a class.

Can you post your code? That would make it easier to see what you are doing wrong.

Can you compare your code against the Derby embedded example program in
demo/programs/workingwithderby/WwdEmbedded.java
(http://db.apache.org/derby/docs/10.5/getstart/rwwdactivity3.html#rwwdactivity3)

If there are sections of that web page that are confusing, ask some questions
about the confusing parts and we'll be glad to help!

thanks,

bryan


Re: java.sql.SQLException: No suitable driver found for jdbc:derby:jdbcDemoDB;create=true

Posted by Kristian Waagan <Kr...@Sun.COM>.
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.


Regards,
-- 
Kristian

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