• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Greenhorns,

First of all sorry my english writing.
I installed JavaJDK 7u13 with NetBeans 7.2.1 and db-derby-10.5.3.0-bin.zip 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 java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:188)
at seconexample.SeconeXample.main(SeconeXample.java:26)
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-10.5.3.0-bin;
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-10.5.3.0-bin;

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Each project in Netbeans has its own classpath, or build path, or whatever Netbeans calls it. Netbeans doesn't use the CLASSPATH environment variable.
 
reply
    Bookmark Topic Watch Topic
  • New Topic