Help!
I'm having issues with an
applet I'm trying to build and no matter what advice I have found over the past 2 days, nothing seems to work.
I have built an applet in Eclipse using web services (so there are multiple jars involved). When I run the .java file as an applet in Eclipse, it works fine. But, when I embed the applet within html, I get errors. See below:
Exception in
thread "AWT-EventQueue-3" java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at com.ngc.bmc2.tis.image.axis.service.ImageServiceLocator.<init>(ImageServiceLocator.java:12)
at com.ngc.bmc2.tis.image.axis.service.ImageServicePortTypeProxy._initImageServicePortTypeProxy(ImageServicePortTypeProxy.java:18)
at com.ngc.bmc2.tis.image.axis.service.ImageServicePortTypeProxy.<init>(ImageServicePortTypeProxy.java:8)
at com.ngc.sb.tis.image.axis.service.client.TisImageryClient.paint(TisImageryClient.java:18)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(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.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 in thread "AWT-EventQueue-4" java.lang.NoClassDefFoundError: Could not initialize class org.apache.axis.client.AxisClient
at org.apache.axis.client.Service.getAxisClient(Service.java:104)
at org.apache.axis.client.Service.<init>(Service.java:113)
at com.ngc.bmc2.tis.image.axis.service.ImageServiceLocator.<init>(ImageServiceLocator.java:12)
at com.ngc.bmc2.tis.image.axis.service.ImageServicePortTypeProxy._initImageServicePortTypeProxy(ImageServicePortTypeProxy.java:18)
at com.ngc.bmc2.tis.image.axis.service.ImageServicePortTypeProxy.<init>(ImageServicePortTypeProxy.java:8)
at com.ngc.sb.tis.image.axis.service.client.TisImageryClient.paint(TisImageryClient.java:18)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(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.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)
-----------------------------------------------------------------------
Here is my directory structure:
C:\~~~~\EclipseProject\WebContent\Applet --> index.html file
C:\~~~~\EclipseProject\WebContent\Applet\classes --> class files from both my web service client and the web service
C:\~~~~\EclipseProject\WebContent\Applet\lib --> jar files of the applet and web service
------------------------------------------------------------------------
Here is the html code:
<html>
<title>Applet
Test</title>
<body>
<h1>Applet Test</h1>
<applet codebase="classes" code="com.ngc.sb.tis.image.axis.service.client.TisImageryClient.class"
height="300" width="300" archive="../lib/applet.jar,../lib/axis.jar,../lib/jaxrpc.jar,
../lib/commons-discovery-0.2.jar,../lib/commons-logging.jar,../lib/saaj.jar,../lib/wsdl4j-1.5.1.jar">
</applet>
</body>
</html>
-------------------------------------------------------------------------
I thought that it might be a
java version issue since the applet I created was in 1.6 and the web service was based on 1.5, but that cannot be right because it would not have worked when I ran it in Eclipse.
Any help would be appreciated because I have been killing myself for two straight days on this trying to find the answer.
If any other information is needed please let me know.
Thanks,
B