I keep getting this error. The app is looking for a class and in fact so am I
where should this class be? I can't find it in the:
db-derby-10.6.2.1-bin and check sup of the dl said it was unaltered?
Thanks

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
	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)
	at java.lang.Class.forName(Unknown Source)
	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(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	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)

Recommended Answers

All 21 Replies

I'm not familiar specifically with Apache Derby, but usually when you download a JDBC driver, there's a jar file which you need to put in your classpath. Did the file you downloaded include a jar file? Did you put the jar file in your classpath?

I'm not familiar specifically with Apache Derby, but usually when you download a JDBC driver, there's a jar file which you need to put in your classpath. Did the file you downloaded include a jar file? Did you put the jar file in your classpath?

I am in the process of doing that again.
My documentation says to user set. Isn't that temporary?
how would I remove the setting below if it were wrong?

Windows: C:\> set DERBY_INSTALL=C:\Apache\db-derby-10.6.2.1-bin

also I am using the Windows Enviornment variables (rt click my computer) and I'd like to know if I use the variables %DERBY_INSTALL% etc to build paths like I did in the cmd line?

so far I have just added ... ;C:\db-derby-10.6.2.1-bin\db-derby-10.6.2.1-bin\bin
to the end of the PATH VARIABLE
ex:

Windows: C:\> set DERBY_INSTALL=C:\Apache\db-derby-10.6.2.1-bin
then
Windows: C:\> set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;

I am just having trouble setting it up.

setting Enviornment variables

JAVA_HOMEC:\Program Files\Java\jdk1.6.0_21

PATH=%SystemRoot%\system32;
%SystemRoot%;%SystemRoot%\System32\Wbem;C:\hp\bin\Python;
C:\db-derby-10.6.2.1-bin\bin;%JAVA_HOME\bin;
C:\Program Files\ATI Technologies\ATI.ACE\Core-Static

C:\db-derby-10.6.2.1-bin

DERBY_INSTALL=C:\db-derby-10.6.2.1-bin


CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar

//cd %DERBY_INSTALL%\bin

//cd C:\db-derby-10.6.2.1-bin\bin

C:\db-derby-10.6.2.1-bin>set DERBY_INSTALL=C:\db-derby-10.6.2.1-bin


// run this at cd above

setEmbeddedCP.bat

RETURN CMD result

C:\db-derby-10.6.2.1-bin>SET DERBY_HOME=C:\DB-DER~1.1-B

C:\db-derby-10.6.2.1-bin>set CLASSPATH=C:\DB-DER~1.1-B\lib\derby.jar;C:\DB-DER~1
.1-B\lib\derbytools.jar;

C:\db-derby-10.6.2.1-bin>

ran the app again[\b]


output and error

run:
CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
 : xml dbProperties.getProperty:
org.apache.derby.jdbc.EmbeddedDriver
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
 : org.apache.derby.jdbc.EmbeddedDriver:var :driverName 

CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
 : : caller 
--->: loadDatabaseDriver(org.apache.derby.jdbc.EmbeddedDriver) : var: driverName <-----

 --> in loadDatabaseDriver(org.apache.derby.jdbc.EmbeddedDriver) var: driverName <-- 

        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:211)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:149)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:136)
        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:230)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:152)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:136)
        at model.dao.DerbyDAOFactory.buildDB(DerbyDAOFactory.java:57)
        at view.Main.main(Main.java:51)
Java Result: 1
BUILD SUCCESSFUL (total time: 3 seconds)

Same error:
still can't find a driver
here is what I have so far:

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.
C:\Users\Steve>echo %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;C:\db-derby-10.6.2.1-bin\bin;C:\Program 
Files\Java\jdk1.6.0_21\bin;C:\Program Files\ATI
Technologies\ATI.ACE\Core-Static;C:\db-derby-10.6.2.1-bin\lib\derby.jar;C:\db-derby-10.6.2.1-bin\lib\derbytools.jar
C:\Users\Steve>cd %DERBY_INSTALL%
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-DER~1.1-B\lib\derbytools.jar;C:\db-derby-10.6.2.1-bin\lib\derby.jar;C:\db-derby-10.6.2.1-bin\lib\derbytools.jar

C:\db-derby-10.6.2.1-bin\bin>sysInfo
------------------ Java Information ------------------
Java Version:    1.6.0_21
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\Program Files\Java\jdk1.6.0_21\jre
Java classpath:  

C:\DB-DER~1.1-B\lib\derby.jar;C:\DB-DER~1.1-B\lib\derbytools.jar;C:\db-derby-10.6.2.1-bin\lib\derby.jar;C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;C:\DB-DER~1.1-/lib/derby.jar;C:\DB-DER~1.1-B/lib/derbynet.jar;C:\DB-DER~1.1-B/lib/derbyclient.jar;C:DB-DER~1.1-B/lib/derbytools.jar
OS name:         Windows Vista
OS architecture: x86
OS version:      6.0
Java user name:  Steve
Java user home:  C:\Users\Steve
Java user dir:   C:\db-derby-10.6.2.1-bin\bin
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
java.runtime.version: 1.6.0_21-b07
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[C:\db-derby-10.6.2.1-bin\lib\derby.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbytools.jar] 10.6.2.1 -(999685)
[C:\db-derby-10.6.2.1-bin\lib\derbynet.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbyclient.jar] 10.6.2.1 - (999685)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale :  [English/United States [en_US]]
Found support for locale: [cs]
         version: 10.6.2.1 - (999685)
Found support for locale: [de_DE]
         version: 10.6.2.1 - (999685)
Found support for locale: [es]
         version: 10.6.2.1 - (999685)
Found support for locale: [fr]
         version: 10.6.2.1 - (999685)
Found support for locale: [hu]
         version: 10.6.2.1 - (999685)
Found support for locale: [it]
         version: 10.6.2.1 - (999685)
Found support for locale: [ja_JP]
         version: 10.6.2.1 - (999685)
Found support for locale: [ko_KR]
         version: 10.6.2.1 - (999685)
Found support for locale: [pl]
         version: 10.6.2.1 - (999685)
Found support for locale: [pt_BR]
         version: 10.6.2.1 - (999685)
Found support for locale: [ru]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_CN]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_TW]
         version: 10.6.2.1 - (999685)
------------------------------------------------------
C:\db-derby-10.6.2.1-bin\bin>

What happened to the previous thread which you created for the same issue? I thought you had managed to sort it out?

What happened to the previous thread which you created for the same issue? I thought you had managed to sort it out?

I am working with the class path still as before as you can see the results are the same;
I also have the app built in eclipse with the exact same error. I stopped when I didn't find
the magic button to create the one jar.

I just ran the stand-alone one jar program and have results that are unclear. I will
post them to view . I was just going to try to find a forum that handles the on jar question. That is if creating one jar is not covered here.


thanks

I have my project (app) and I was trying to use the one jar

program.
Has any one ever used one jar to create a .jar?

I ran the program:

C:\>one-jar-appgen-097.jar
'one-jar-appgen-097.jar' is not recognized as an internal or 

external command,
operable program or batch file.

C:\>cd Program Files\java\jdk1.6.0_21\bin

C:\Program Files\Java\jdk1.6.0_21\bin>java -jar 

C:\one-jar-appgen-0.97
Unable to access jarfile C:\one-jar-appgen-0.97

C:\Program Files\Java\jdk1.6.0_21\bin>java -jar 

C:\one-jar-appgen-0.97.jar
Enter project path (project name is last segment):

ended up with

C:\temp\test-one-jar>dir
 Volume in drive C is COMPAQ
 Volume Serial Number is 604A-9934

 Directory of C:\temp\test-one-jar

10/12/2010  05:38 AM    <DIR>          .
10/12/2010  05:38 AM    <DIR>          ..
10/12/2010  05:38 AM               602 .classpath
10/12/2010  05:38 AM               371 .project
10/12/2010  05:38 AM             4,638 build.xml
10/12/2010  05:38 AM    <DIR>          ide
10/12/2010  05:38 AM    <DIR>          junit
10/12/2010  05:38 AM    <DIR>          lib
10/12/2010  05:38 AM    <DIR>          one-jar
10/12/2010  05:38 AM    <DIR>          src
10/12/2010  05:38 AM    <DIR>          test
               3 File(s)          5,611 bytes
               8 Dir(s)  273,157,906,432 bytes free

C:\temp\test-one-jar>

I am lost here I am not sure what I have or if anything what I

should do.

[/b]based one the instructions:[/b]
http://one-jar.sourceforge.net/index.php?page=getting-started&fi

le=quickstart

Hello seeing as Elipse and one-jar are a work in progress. I digress.
I have the error:

run:
CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
 : xml dbProperties.getProperty:
org.apache.derby.jdbc.EmbeddedDriver
CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
 : org.apache.derby.jdbc.EmbeddedDriver:var :driverName 

CLASS 
ConnectDerbyDAO: 
 --> in ConnectDerbyDAO(schoolofdb) var: schoolofdb <-- 
 : : caller 
--->: loadDatabaseDriver(org.apache.derby.jdbc.EmbeddedDriver) : var: driverName <-----
        at java.net.URLClassLoader$1.run(
 --> in loadDatabaseDriver(org.apache.derby.jdbc.EmbeddedDriver) var: driverName <-- 

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:211)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:149)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:136)
        at model.dao.DerbyDAOFactory.buildDB(DerbyDAOFactory.java:57)
        at view.Main.main(Main.java:50)
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:230)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:152)
        at model.dao.ConnectDerbyDAO.<init>(ConnectDerbyDAO.java:136)
        at model.dao.DerbyDAOFactory.buildDB(DerbyDAOFactory.java:57)
        at view.Main.main(Main.java:50)
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)

This Error is caught at :

public void loadDatabaseDriver(String driverName) {

        String M =(" --> in loadDatabaseDriver("+driverName+") var: driverName <-- \n");
       System.out.println(M);
        // load Derby driver
        try {

            Class.forName(driverName);
            System.out.println(C + M +  AND +" Class.forName(driverName);\n"+  Class.forName(driverName));
            //dbProperties.put("user", "sa");
            //dbProperties.put("password", "manager");
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        }
    }

Shouldn't derby know what it driver is?

It looks like it must be a classpath problem, because you seem to have the correct string for finding the class within the jar file in your code.

Are you running your app from the command line or from inside an IDE?

It looks like you are trying to set up your environment variables using a batch file. Have you tried to use the system environment variables setting?

There are several problems to come such errors. sometime java software is not propositional with system. mostly 80% problems faced form this. you have to reinstalled latest software of java. if you not set the right path of java then also error is occured. and sometimes your class declaration is wrong which is silly mistake. so do analysis on this.

There are several problems to come such errors. sometime java software is not propositional with system. mostly 80% problems faced form this. you have to reinstalled latest software of java. if you not set the right path of java then also error is occured. and sometimes your class declaration is wrong which is silly mistake. so do analysis on this.

I can try to re-install the jdk but this is the Enviornment. My app is run from Netbeans IDE.

Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Steve>ECHO %DERBY_HOME%
C:\db-derby-10.6.2.1-bin

C:\Users\Steve>CD %JAVA_HOME%\bin

C:\Program Files\Java\jdk1.6.0_21\bin>java -version
java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
%Path%
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\hp\bin\Python;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;%JAVA_HOME%\bin;%CLASSPATH%;%ANT_HOME%\bin\ant.bat;%JAVA_HOME%\bin\jave.exe;%DERBY_HOME%\bin


%CLASSPATH%
%DERBY_INSTALL%\lib\derbytools.jar
C:\Users\Steve>ECHO %CLASSPATH%
C:\db-derby-10.6.2.1-bin\lib\derbytools.jar

C:\Users\Steve>
C:\Users\Steve>ECHO %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;C:\Prog
ram Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Java\jdk1.6.0_21
\bin;C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;C:\ant\bin\ant.bat;C:\Program F
iles\Java\jdk1.6.0_21\bin\jave.exe;C:\db-derby-10.6.2.1-bin\bin

C:\Users\Steve>

There are several problems to come such errors. sometime java software is not propositional with system. mostly 80% problems faced form this. you have to reinstalled latest software of java. if you not set the right path of java then also error is occured. and sometimes your class declaration is wrong which is silly mistake. so do analysis on this.

Do not reply to technical articles if yo have no clue. Your signature spamming is not welcome, you do it again and we will take action.

Do not reply to technical articles if yo have no clue. Your signature spamming is not welcome, you do it again and we will take action.

What are you talking about?
I didn't realize toplinecar was spamming.

@ceyesuma bellow quoted section is just rubbish. Possibly ex-IT student with little software development background. However if you check his posting history you may find some other lame posts like this

There are several problems to come such errors. sometime java software is not propositional with system. mostly 80% problems faced form this. you have to reinstalled latest software of java. if you not set the right path of java then also error is occured. and sometimes your class declaration is wrong which is silly mistake. so do analysis on this.

It looks like it must be a classpath problem, because you seem to have the correct string for finding the class within the jar file in your code.

Are you running your app from the command line or from inside an IDE?

It looks like you are trying to set up your environment variables using a batch file. Have you tried to use the system environment variables setting?

Thanks lol I thought I did something wrong again.

Here is what I got if I could get some feed back that would be great! thanks.

Can anyone help me load this derby driver I have tried to set

everything.
on my computer I have %Path% and I thought that is where the

classpath for programs was.
not sure any more because the examples use %PATH% and

%CLASSPATH% any way this is what I have.

On this installation I would like to use the tools derby has. ij

in particular or any other tool recomended.

apahe derby10.1.2.1-bin in on C:\
C:\Users\Steve>CD %DERBY_INSTALL%\bin

C:\db-derby-10.6.2.1-bin\bin>sysinfo
------------------ Java Information ------------------
Java Version:    1.6.0_21
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\Program Files\Java\jdk1.6.0_21\jre
Java classpath:  

C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;;C:\db-derby-10.6.2
.1-bin/lib/derby.jar;C:\db-derby-10.6.2.1-bin/lib/derbynet.jar;C

:\db-derby-10.6.
2.1-bin/lib/derbyclient.jar;C:\db-derby-10.6.2.1-bin/lib/derbyto

ols.jar
OS name:         Windows Vista
OS architecture: x86
OS version:      6.0
Java user name:  Steve
Java user home:  C:\Users\Steve
Java user dir:   C:\db-derby-10.6.2.1-bin\bin
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
java.runtime.version: 1.6.0_21-b07
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[C:\db-derby-10.6.2.1-bin\lib\derby.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbytools.jar] 10.6.2.1 - 

(999685)
[C:\db-derby-10.6.2.1-bin\lib\derbynet.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbyclient.jar] 10.6.2.1 - 

(999685)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale :  [English/United States [en_US]]
Found support for locale: [cs]
         version: 10.6.2.1 - (999685)
Found support for locale: [de_DE]
         version: 10.6.2.1 - (999685)
Found support for locale: [es]
         version: 10.6.2.1 - (999685)
Found support for locale: [fr]
         version: 10.6.2.1 - (999685)
Found support for locale: [hu]
         version: 10.6.2.1 - (999685)
Found support for locale: [it]
         version: 10.6.2.1 - (999685)
Found support for locale: [ja_JP]
         version: 10.6.2.1 - (999685)
Found support for locale: [ko_KR]
         version: 10.6.2.1 - (999685)
Found support for locale: [pl]
         version: 10.6.2.1 - (999685)
Found support for locale: [pt_BR]
         version: 10.6.2.1 - (999685)
Found support for locale: [ru]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_CN]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_TW]
         version: 10.6.2.1 - (999685)
------------------------------------------------------
C:\db-derby-10.6.2.1-bin\bin>
C:\db-derby-10.6.2.1-bin\bin>sysinfo -cp
Testing for presence of all Derby-related libraries; typically, 

only some are needed.
For a list of possible arguments, type java 

org.apache.derby.tools.sysinfo -cp a
rgs
FOUND IN CLASS PATH:

   Derby embedded engine library (derby.jar)
   C:\db-derby-10.6.2.1-bin\lib\derby.jar


   Derby embedded engine library (derby.jar)
   C:\db-derby-10.6.2.1-bin\lib\derby.jar


   Derby Network Server library (derbynet.jar)
   C:\db-derby-10.6.2.1-bin\lib\derbynet.jar


   Derby Client libraries (derbyclient.jar)
   C:\db-derby-10.6.2.1-bin\lib\derbyclient.jar


   Derby tools library (derbytools.jar)
   C:\db-derby-10.6.2.1-bin\lib\derbytools.jar



NOT FOUND IN CLASS PATH:

   Derby Client libraries (db2jcc.jar)
    (com.ibm.db2.jcc.DB2Driver not found.)


C:\db-derby-10.6.2.1-bin\bin>
C:\db-derby-10.6.2.1-bin\bin>ECHO %DERBY_INSTALL%
C:\db-derby-10.6.2.1-bin

C:\db-derby-10.6.2.1-bin\bin>ECHO %DERBY_HOME%
C:\db-derby-10.6.2.1-bin

C:\db-derby-10.6.2.1-bin\bin>ECHO %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_21

C:\db-derby-10.6.2.1-bin\bin>ECHO %CLASSPATH%
C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;

C:\db-derby-10.6.2.1-bin\bin>ECHO %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;
C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;
[b]C:\Program Files\Java\jdk1.6.0_21\bin;
C:\ant\bin\ant.bat;
C:\Program Files\Java\jdk1.6.0_21\bin\jave.exe;
C:\db-derby-10.6.2.1-bin\bin;
C:\db-derby-10.6.2.1-bin\lib\derby.jar;
C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;
[/b]

Hmmm. At the top of your last post, when you do sysinfo, it shows that
C:\db-derby-10.6.2.1-bin/lib/derby.jar is on the classpath (although the slashes look a bit messed up). But near the end of your post where you "ECHO %CLASSPATH%", it only shows C:\db-derby-10.6.2.1-bin\lib\derbytools.jar and not C:\db-derby-10.6.2.1-bin\lib\derby.jar. I think you need the latter on your classpath (not your PATH).

Also, I'm not familiar enough with NetBeans, but in eclipse you set up the jar files you want in your project settings, and it doesn't matter what's on the classpath outside of the IDE. So you might need to check the NetBeans settings.

Finally, I don't know why this thread was marked solved when clearly it isn't.

I changed the position of %CLASSPATH% in the %Path% at post time because while editing
I discovered ';;' and found and entry with out a ';' I don't think it matters but I will
re-do. right now.

here is the actual Enviorment variable:

%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\hp\bin\Python;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;%JAVA_HOME%\bin;%ANT_HOME%\bin\ant.bat;%JAVA_HOME%\bin\jave.exe;%DERBY_HOME%\bin;%DERBY_HOME%\lib\derby.jar;%CLASSPATH%
version: 10.6.2.1 - (999685)
------------------------------------------------------
C:\db-derby-10.6.2.1-bin\bin>ECHO %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\hp\bin\Python;
C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Java\jdk1.6.0_21
\bin;C:\ant\bin\ant.bat;
[b]C:\Program Files\Java\jdk1.6.0_21\bin\jave.exe;
C:\db-derby-10.6.2.1-bin\bin;
C:\db-derby-10.6.2.1-bin\lib\derby.jar;
C:\db-derby-10.6.2.1-bin\lib\derbytools.jar
[/b]

C:\db-derby-10.6.2.1-bin\bin>ECHO %CLASSPATH%
C:\db-derby-10.6.2.1-bin\lib\derbytools.jar

C:\db-derby-10.6.2.1-bin\bin>ECHO %JAVA_HOME%
C:\Program Files\Java\jdk1.6.0_21

C:\db-derby-10.6.2.1-bin\bin>ECHO %DERBY_INSTALL%
C:\db-derby-10.6.2.1-bin

C:\db-derby-10.6.2.1-bin\bin>ECHO %DERBY_HOME%
C:\db-derby-10.6.2.1-bin

C:\db-derby-10.6.2.1-bin\bin>
Microsoft Windows [Version 6.0.6000]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Users\Steve>CD %DERBY_INSTALL%\bin

C:\db-derby-10.6.2.1-bin\bin>sysinfo
------------------ Java Information ------------------
Java Version:    1.6.0_21
Java Vendor:     Sun Microsystems Inc.
Java home:       C:\Program Files\Java\jdk1.6.0_21\jre
Java classpath:  

C:\db-derby-10.6.2.1-bin\lib\derbytools.jar;C:\db-derby-10.6.2.
1-bin/lib/derby.jar;C:\db-derby-10.6.2.1-bin/lib/derbynet.jar;C:

\db-derby-10.6.2
.1-bin/lib/derbyclient.jar;C:\db-derby-10.6.2.1-bin/lib/derbytoo

ls.jar
OS name:         Windows Vista
OS architecture: x86
OS version:      6.0
Java user name:  Steve
Java user home:  C:\Users\Steve
Java user dir:   C:\db-derby-10.6.2.1-bin\bin
java.specification.name: Java Platform API Specification
java.specification.version: 1.6
java.runtime.version: 1.6.0_21-b07
--------- Derby Information --------
JRE - JDBC: Java SE 6 - JDBC 4.0
[C:\db-derby-10.6.2.1-bin\lib\derby.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbytools.jar] 10.6.2.1 - 

(999685)
[C:\db-derby-10.6.2.1-bin\lib\derbynet.jar] 10.6.2.1 - (999685)
[C:\db-derby-10.6.2.1-bin\lib\derbyclient.jar] 10.6.2.1 - 

(999685)
------------------------------------------------------
----------------- Locale Information -----------------
Current Locale :  [English/United States [en_US]]
Found support for locale: [cs]
         version: 10.6.2.1 - (999685)
Found support for locale: [de_DE]
         version: 10.6.2.1 - (999685)
Found support for locale: [es]
         version: 10.6.2.1 - (999685)
Found support for locale: [fr]
         version: 10.6.2.1 - (999685)
Found support for locale: [hu]
         version: 10.6.2.1 - (999685)
Found support for locale: [it]
         version: 10.6.2.1 - (999685)
Found support for locale: [ja_JP]
         version: 10.6.2.1 - (999685)
Found support for locale: [ko_KR]
         version: 10.6.2.1 - (999685)
Found support for locale: [pl]
         version: 10.6.2.1 - (999685)
Found support for locale: [pt_BR]
         version: 10.6.2.1 - (999685)
Found support for locale: [ru]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_CN]
         version: 10.6.2.1 - (999685)
Found support for locale: [zh_TW]
         version: 10.6.2.1 - (999685)
------------------------------------------------------
C:\db-derby-10.6.2.1-bin\bin>

You should not be adding your CLASSPATH to your PATH. These are two different things. The PATH is where Windows finds programs to execute. The CLASSPATH is where Java finds classes, both at compile time and at runtime.

At the top of this most recent post, you say here is the environment variable. I'm guessing that is the PATH. You should take %CLASSPATH% off the end. It doesn't belong there.

The second part of this most recent post again shows that the CLASSPATH only contains derbytools.jar and doesn't contain derby.jar. This is the problem that needs to be fixed.

You should not be adding your CLASSPATH to your PATH. These are two different things. The PATH is where Windows finds programs to execute. The CLASSPATH is where Java finds classes, both at compile time and at runtime.

At the top of this most recent post, you say here is the environment variable. I'm guessing that is the PATH. You should take %CLASSPATH% off the end. It doesn't belong there.

The second part of this most recent post again shows that the CLASSPATH only contains derbytools.jar and doesn't contain derby.jar. This is the problem that needs to be fixed.

I took %CLASSPATH% off the end of path and added %DERBY_INSTALL%\lib\derby.jar to the %CLASSPATH%

It still goes to properties and gets org.apache.derby.jdbc.EmbeddedDriver entry and
the sys can not find that..
I will have time to start it over again tonight. The first time I set it up it was easy.
I thought I added something to the project at that time. Like a library or something. Is this possible?
Thank you for your time.

Yes, as I said before, you probably need to add the jar file to your project inside of NetBeans.

Yes, as I said before, you probably need to add the jar file to your project inside of NetBeans.

That did it . I learned a great deal about Environment variables and Command syntax. The App runs again. Thanks for the help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.