db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdb <gdbl...@ozemail.com.au>
Subject Cannot get a Derby connection in eclipse
Date Mon, 19 Dec 2011 04:57:25 GMT

I have just installed Java, Derby & ecplise on a windows 7 machine and have
zero experience with all three.

I have copied a example in one of the tutorials into eclipse but I can't get
a Derby Connection.

Derby was started with 'startnetworkserver'

Class.forName("org.apache.derby.jdbc.ClientDriver").newInstance();
private static String url = "jdbc:derby://localhost:1527/MyDbTest";
conn = DriverManager.getConnection(url);

results in

java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.Class.forName0(Native Method)

I have played with ij with the following results:

connect 'jdbc:derby:MyDbTest'                                        //
works
-Dij.connection.one=jdbc:derby:MyDbTest                          //fails
-Dij.connection.two=jdbc:derby//localhost:1527/MyDbTest    // fails

Would anyone have any helpful suggestions 
-- 
View this message in context: http://old.nabble.com/Cannot-get-a-Derby-connection-in-eclipse-tp33000785p33000785.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.


Mime
View raw message