I'm in the process of porting a prototype application developed under Tomcat to JBoss for production. Part of our app is an applet for uploading data onto the web server. Here's the code for the applet:
<applet id="UploaderApplet" name="UploaderApplet"
code="com.initech.uploader.AppletFrontend.class"
archive="jar/Initech.Uploader.jar" mayscript
width="1px" height="1px">
<param name="separate_jvm" value="true" />
<param name="java_arguments" value="-Xmx300m"/>
</applet>
This applet works fine when served under Tomcat, but when the same application is hosted on a JBoss server, the Java Console shows ClassNotFoundExceptions:
MRJ Plugin for Mac OS X v1.0.1
[starting up Java Applet Security @ Thu May 13 09:48:07 EDT 2010]
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@165b7e, refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@e45b5e
basic: Loading applet…
basic: Initializing applet…
network: Connecting http://localhost:8080/myapp/jar/Initech.Uploader.jar with proxy=DIRECT
network: Connecting socket://localhost:8080 with proxy=DIRECT
network: Connecting http://localhost:8080/myapp/jar/Initech.Uploader.jar with proxy=DIRECT
network: Connecting socket://localhost:8080 with proxy=DIRECT
network: Connecting http://localhost:8080/myapp/com/initech/uploader/AppletFrontend.class with proxy=DIRECT
network: Connecting socket://localhost:8080 with proxy=DIRECT
network: Connecting http://localhost:8080/myapp/com/initech/uploader/AppletFrontend/class.class with proxy=DIRECT
network: Connecting socket://localhost:8080 with proxy=DIRECT
load: class com.initech.uploader.AppletFrontend.class not found.
java.lang.ClassNotFoundException: com.initech.uploader.AppletFrontend.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:211)
at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:662)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:2372)
at jep.AppletFramePanel.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
at sun.applet.AppletPanel.run(AppletPanel.java:368)
at jep.AppletFramePanel.run(Unknown Source)
at java.lang.Thread.run(Thread.java:637)
basic: Exception: java.lang.ClassNotFoundException: com.initech.uploader.AppletFrontend.class
I'm able to download the jar from the links listed in the log dump. For what it's worth, my development environment is a Snow Leopard Mac running Firefox 3.6.