db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Costelloe <da...@welford-costelloe.com>
Subject Error Running Embedded
Date Sun, 15 Jan 2006 01:24:58 GMT
Hi,
I am getting the follow errors when running the jar with the following 
command line:
I am using Eclipse 3.1

java -cp derby.jar;DerbySample.jar pkgEclipseDerby.frmDataDBSample

Stack:

C:\Workspace>java -cp derby.jar;DerbySample.jar 
pkgEclipseDerby.frmDataDBSample
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.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at 
pkgEclipseDerby.derbyConnections.createConnection(derbyConnections.ja
va:76)
        at 
pkgEclipseDerby.frmDataDBSample.GetSayingsFromDB(frmDataDBSample.java
:409)
        at 
pkgEclipseDerby.frmDataDBSample.GetDataLoaded(frmDataDBSample.java:43
1)
        at 
pkgEclipseDerby.frmDataDBSample.access$2(frmDataDBSample.java:427)
        at 
pkgEclipseDerby.frmDataDBSample$7.actionPerformed(frmDataDBSample.jav
a:300)
        at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
        at javax.swing.AbstractButton$Handler.actionPerformed(Unknown 
Source)
        at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown 
Source)
        at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
        at 
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
        at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at javax.swing.JComponent.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown 
Source)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown 
Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

=======================================================================

Code:
                      try {
                                               
                       
                            
Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
                       
                        // Get Connection
                        conn = DriverManager.getConnection(dbURL);
                    } catch (ClassNotFoundException e) {
                       
                        e.printStackTrace();
                        return(false);
                    } catch (SQLException e) {
                       
                        e.printStackTrace();
                        return(false);
                    }
                        return(true);
       
    }



Thanks


Mime
View raw message