File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Apache Derby Exception in NetBeans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Apache Derby Exception in NetBeans" Watch "Apache Derby Exception in NetBeans" New topic
Author

Apache Derby Exception in NetBeans

ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
.....(more Exceptions)

I got these Exceptions while running an application that connects to a data base using NetBeans IDE, note that I have successfully connected to the data base from the runtime window using these settings.

URL: jdbc:derby://localhost:1527/database_name
Driver: org.apache.derby.jdbc.ClientDriver
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
Please check that the classpath contains the Derby ClientDriver.
ahmed yehia
Ranch Hand

Joined: Apr 22, 2006
Posts: 424
The problem was I had the driver in my System Classpath only, but now after adding the driver to the project Classpath in NetBeans it works well, thanks.
[ February 16, 2008: Message edited by: Ahmed Yehia ]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40052
    
  28
You're welcome.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Derby Exception in NetBeans