You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by Wessam Abd Rabo <we...@gmail.com> on 2007/09/18 12:07:06 UTC

NoClassDefFound Exception

Hi,

The following piece of code creates a relational db from an XML file.

 String  nameoffile= "xmltodb.xml";
        Database targetModel = new DatabaseIO().read(nameoffile);

        BasicDataSource dataSource = new BasicDataSource();
        dataSource.setUrl("jdbc:derby://localhost:1527/testonm10");
        dataSource.setDriverClassName("org.apache.derby.jdbc.ClientDriver");

        boolean    alterDb = false;

        Platform platform = PlatformFactory.createNewPlatformInstance
(dataSource);

        if (alterDb) {
            platform.alterTables(targetModel, false);
        } else {

            platform.createTables(targetModel, true, false);
        }

I get the following exception:

java.lang.NoClassDefFoundError:
org/apache/commons/betwixt/strategy/NameMapper
 at org.netbeans.formod.DDLTopComponentTopComponent.jButton1MouseClicked(
DDLTopComponentTopComponent.java:71)
 at org.netbeans.formod.DDLTopComponentTopComponent.access$000(
DDLTopComponentTopComponent.java:18)
 at org.netbeans.formod.DDLTopComponentTopComponent$1.mouseClicked(
DDLTopComponentTopComponent.java:47)
 at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
 at java.awt.Component.processMouseEvent(Component.java:6041)
 at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
 at java.awt.Component.processEvent(Component.java:5803)
 at java.awt.Container.processEvent(Container.java:2058)
 at java.awt.Component.dispatchEventImpl(Component.java:4410)
 at java.awt.Container.dispatchEventImpl(Container.java:2116)
 at java.awt.Component.dispatchEvent(Component.java:4240)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3995)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
 at java.awt.Container.dispatchEventImpl(Container.java:2102)
 at java.awt.Window.dispatchEventImpl(Window.java:2429)
 at java.awt.Component.dispatchEvent(Component.java:4240)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(
EventDispatchThread.java:273)
 at java.awt.EventDispatchThread.pumpEventsForFilter(
EventDispatchThread.java:183)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(
EventDispatchThread.java:173)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

What could be the reason for this error?can you please help me with that

Wessam

Re: NoClassDefFound Exception

Posted by Thomas Dudziak <to...@gmail.com>.
On 9/18/07, Wessam Abd Rabo <we...@gmail.com> wrote:

> java.lang.NoClassDefFoundError:
> org/apache/commons/betwixt/strategy/NameMapper
>  at org.netbeans.formod.DDLTopComponentTopComponent.jButton1MouseClicked(
> DDLTopComponentTopComponent.java:71)
>  at org.netbeans.formod.DDLTopComponentTopComponent.access$000(
> DDLTopComponentTopComponent.java:18)
>  at org.netbeans.formod.DDLTopComponentTopComponent$1.mouseClicked(
> DDLTopComponentTopComponent.java:47)

<snip>

> What could be the reason for this error?can you please help me with that

Looks like you're missing a library, commons-betwixt to be precise.
You can find it in the lib directory within the binary or source
distribution.

Tom