aspose file tools
The moose likes Beginning Java and the fly likes java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver" Watch "java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver" New topic

java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver

Betl Gokr

Joined: Feb 17, 2013
Posts: 3
Dear Greenhorns,

First of all sorry my english writing.
I installed JavaJDK 7u13 with NetBeans 7.2.1 and on a fresh OS. Then i set the environment variables according to their relative paths as seen below. By using ij the test database and the test table created, records inserted and displayed by using select. In command line and also in NetBeans IDE the HelloWorld console app run successfully.So far everything was fine. But when i try to make a connection inside NetBeans by using the code below i got the following exception.
Any help will be greatly appreciated. Urgent.

Exception in thread "main" java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at seconexample.SeconeXample.main(
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

JAVA_HOME = C:\Program Files\Java\jdk1.7.0_13 ;
DERBY_HOME = C:\Apache\db-derby-;
CLASSPATH = %DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;
Path = %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.7.0_13\bin
DERBY_INSTALL = C:\Apache\db-derby-;

Paul Clapham

Joined: Oct 14, 2005
Posts: 19357

Each project in Netbeans has its own classpath, or build path, or whatever Netbeans calls it. Netbeans doesn't use the CLASSPATH environment variable.
jQuery in Action, 2nd edition
subject: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver