I'm getting the following error (Note: I am using Netbeans):
java.sql.SQLException: No suitable driver found for jdbc:derby://localhost:7001/LF_JHU_DERBY
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at randomtests.UFTest.main(UFTest.java:38)
The relevant part of my code is:
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
DriverManager.getConnection("jdbc:derby://localhost:7001/JP_JHU_DERBY", username, password);
I have the derby.jar file in my Java/Extensions directory--without that the embedded driver was not being found. So I have a few Q's:
Shouldn't it have a JDBC driver from the
Class.forName()
method? Why have problems all of a sudden atgetConnection()
?I thought I didn't even have to load a driver with the newer JDK's. I am using Netbeans and (succesfully, I think) set the netbeans.conf file to the latest JDK (with "netbeans_jdkhome="/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home"). What am I missing?