I have a java app that used to use a property and I am not sure with the changes I've
made to the class path how to find the driver.
I thought I was using the exact same installation but I can't find the driver.
Can someone please tell my what my new property "derbyDriver" should be based on all the
Enviornment variables that I set.
I used this property for months and months etc. and it worked before but now I had to reset \
everything. Hopefully this will enable ij for derby.
my property
<entry key="derbyDriver">org.apache.derby.jdbc.EmbeddedDriver</entry>
the unzipped dir of apache derby location
C:\db-derby-10.6.2.1-bin
break down of the variables I set RIGHT CLICK ON PROPERTIES OF C:\
DERBY_INSTALL=C:\db-derby-10.6.2.1-bin
JAVA_HOME C:\Program Files\Java\jdk1.6.0_21
PATH C:\Program Files\Java\jdk1.6.0_13\bin;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\db-derby-10.6.2.1-bin
CLASSPATH C:\db-derby-10.6.2.1-bin\lib\derby.jar;C:\db-derby-10.6.2.1-bin\lib\derbytools.jar
set embeddedCP.bat
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.
C:\Users\Steve>cd C:\db-derby-10.6.2.1-bin
C:\db-derby-10.6.2.1-bin>cd bin
C:\db-derby-10.6.2.1-bin\bin>setEmbeddedCP.bat
C:\db-derby-10.6.2.1-bin\bin>SET DERBY_HOME=C:\DB-DER~1.1-B
C:\db-derby-10.6.2.1-bin\bin>set CLASSPATH=C:\DB-DER~1.1-B\lib\derby.jar;C:\DB-D
ER~1.1-B\lib\derbytools.jar;C:\db-derby-10.6.2.1-bin\lib\derby.jar;C:\db-derby-1
0.6.2.1-bin\lib\derbytools.jar
C:\db-derby-10.6.2.1-bin\bin>
my property
<entry key="derbyDriver">org.apache.derby.jdbc.EmbeddedDriver</entry>
error
run:
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at model.dao.ConnectDerbyDAO.loadDatabaseDriver(ConnectDerbyDAO.java:174)
at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:116)
at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:107)
at model.dao.DerbyDAOFactory.buildDB(DerbyDAOFactory.java:57)
at view.Main.main(Main.java:51)
Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:derby:schoolofdb
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:154)
at model.dao.ConnectDerbyDAO.createDatabase(ConnectDerbyDAO.java:192)
at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:119)
at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:107)
at model.dao.DerbyDAOFactory.buildDB(DerbyDAOFactory.java:57)
at view.Main.main(Main.java:51)
Java Result: 1
BUILD SUCCESSFUL (total time: 6 seconds)
Thank you.