2 Replies Latest reply: Nov 2, 2011 3:02 PM by baftos RSS

    Classpath issue, but I don't see how

    897473
      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=http://10.28.127.52/,WaferID-4.5.jar, commons-lang-2.6.jar, commons-net-1.3.0.jar, refCount=1, threadGroup=sun.plugin2.applet.Applet2ThreadGroup[name=http://10.28.127.52/-threadGroup,maxpri=4]
      Done.

      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 http://10.28.127.52/WaferID-4.5.jar
      basic: Plugin2ClassLoader.addURL parent called for http://10.28.127.52/commons-lang-2.6.jar
      basic: Plugin2ClassLoader.addURL parent called for http://10.28.127.52/commons-net-1.3.0.jar
      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$AppletExecutionRunnable.run(Unknown Source)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NoClassDefFoundError: org/apache/commons/net/ftp/FTPClient
           at com.cognex.insight.waferid.gui.FileTabButtonHandler.<init>(FileTabButtonHandler.java:61)
           at com.cognex.insight.waferid.gui.tabs.TabFile.<init>(TabFile.java:142)
           at com.cognex.insight.waferid.gui.WaferIdApplet.<init>(WaferIdApplet.java:230)
           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$12.run(Unknown 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$1.run(Unknown Source)
           at java.awt.EventQueue$1.run(Unknown Source)
           at java.security.AccessController.doPrivileged(Native Method)
           at java.security.AccessControlContext$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 java.awt.EventDispatchThread.run(Unknown 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