This discussion is archived
2 Replies Latest reply: Nov 2, 2011 1:02 PM by baftos RSS

Classpath issue, but I don't see how

897473 Newbie
Currently Being Moderated
We have developed and Applet and are trying to test it. It relys on some of the Apache commons libraries. When the Applet loads we get a NoClassDefFoundError. As you can see from the attached log, the browser is loading the commons-net jar.

Java Plug-in 1.6.0_26
Using JRE version 1.6.0_26-b03 Java HotSpot(TM) Client VM
User home directory = C:\Users\pohara
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
Dumping class loader cache...
Live entry: key=,WaferID-4.5.jar, commons-lang-2.6.jar, commons-net-1.3.0.jar, refCount=1, threadGroup=sun.plugin2.applet.Applet2ThreadGroup[name=,maxpri=4]

Memory: 17,504K Free: 6,319K (36%) ... completed.
Trace level set to 5: all ... completed.
Logging set to : true ... completed.
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@26fbfc
basic: Plugin2ClassLoader.addURL parent called for
basic: Plugin2ClassLoader.addURL parent called for
basic: Plugin2ClassLoader.addURL parent called for
basic: exception: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient.
java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
     at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$ Source)
     at Source)
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
     at com.cognex.insight.waferid.gui.FileTabButtonHandler.<init>(
     at com.cognex.insight.waferid.gui.tabs.TabFile.<init>(
     at com.cognex.insight.waferid.gui.WaferIdApplet.<init>(
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at java.lang.Class.newInstance0(Unknown Source)
     at java.lang.Class.newInstance(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$ Source)
     at java.awt.event.InvocationEvent.dispatch(Unknown Source)
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
     at java.awt.EventQueue.access$000(Unknown Source)
     at java.awt.EventQueue$ Source)
     at java.awt.EventQueue$ Source)
     at Method)
     at$1.doIntersectionPrivilege(Unknown Source)
     at java.awt.EventQueue.dispatchEvent(Unknown Source)
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
     at Source)
Exception: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient

I assume that there must be an issue loading the FTPClient, but it has not external dependencies that I am aware of. I am pretty sure this is not a classpath issue, but am at a loss where else to look.

Pat O


  • Correct Answers - 10 points
  • Helpful Answers - 5 points