i'm interested in using & buying jfileupload, but i'm unable to run it through the webserver.
It's a windows XP machine, with latest xampp 1.7.4 (Apache 2.2.17), latest JRE 1.6.0_24-b07.
When i run the file locally, i.e. doubleclick applet_http.html, applet loads ok and in the browser's address bar i can see local path file://c:/...path.../applet_http.html.
But when i open my local webserver at 127.0.0.1, navigate to applet_http.html and click on it,
in the applet window there is an error message: Error. click on details (no matter if I use
firefox or IE). In a few seconds the window disappears and java crashes.
The error from java console is:
Code: Select all
load: class jfileupload.upload.client.MApplet.class not found.
java.lang.ClassNotFoundException: jfileupload.upload.client.MApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: jfileupload.upload.client.MApplet.class
Now the strange part: I thought the problem is some apache settings, but to be sure
I wrote HelloWorld.class applet, created hworld.jar archive from it, and put it to \lib dir.
I updated applet_http.js to use my hworld.jar (CODE="HelloWorld.class" and
ARCHIVE VALUE="lib\hworld.jar) and guess what? Yes, it works.
I made two simple html versions of the script loader applet_http.html (with no different browser support etc) and here they are: File1
Code: Select all
<html><body>
<APPLET CODE="jfileupload.upload.client.MApplet.class" JAVA_CODEBASE="./" ARCHIVE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar" WIDTH="250" HEIGHT="250" NAME="fileupload">
<PARAM NAME=ARCHIVE VALUE="lib/jfileupload.jar,lib/httpimpl.jar,lib/chttpclient.jar,lib/clogging.jar">
<PARAM NAME=CODE VALUE="jfileupload.upload.client.MApplet.class">
<PARAM NAME=CODEBASE VALUE="./">
<PARAM NAME=NAME VALUE="fileupload">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
<PARAM NAME="scriptable" VALUE="true">
<PARAM NAME="url" VALUE="http://localhost:8080/upload/process.jsp">
<PARAM NAME="paramfile" VALUE="uploadfile">
<PARAM NAME="param1" VALUE="todo">
<PARAM NAME="value1" VALUE="upload">
<PARAM NAME="mode" VALUE="http">
<!-- <PARAM NAME="resources" VALUE="i18n"> -->
<PARAM NAME="authentication" VALUE="auto">
</APPLET>
</body></html>
Runs ok locally (file://c:/...applet_http.html) with both FF and IE.
But makes error and crashes java vhen running through web browser (127.0.0.1/applet_http.html).
File2:
Code: Select all
<html><body>
<APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25>
<PARAM NAME=ARCHIVE VALUE="lib\hworld.jar">
<PARAM NAME=CODEBASE VALUE="./">
<PARAM NAME=NAME VALUE="fileupload">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.4">
<PARAM NAME="scriptable" VALUE="true">
<PARAM NAME="url" VALUE="http://localhost:8080/upload/process.jsp">
<PARAM NAME="paramfile" VALUE="uploadfile">
<PARAM NAME="param1" VALUE="todo">
<PARAM NAME="value1" VALUE="upload">
<PARAM NAME="mode" VALUE="http">
<!-- <PARAM NAME="resources" VALUE="i18n"> -->
<PARAM NAME="authentication" VALUE="auto">
</APPLET>
</body></html>
Do you have any suggestions what can cause the problem? I tried to change the applet paramerers (like CODE - some are thice in File1), i tried to change the path but still with no luck.
i tried to move the code to apache's root directory (also the /lib dir) and I get slightly different
error, it seems some applets were downloaded ok but still doesn't work, here's the new log
from java console:
Code: Select all
----------------------------------------------------
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>
----------------------------------------------------
Trace level set to 5: all ... completed.
network: CleanupThread used 2 us
network: CleanupThread used 2 us
network: CleanupThread used 2 us
network: CleanupThread used 1 us
network: Cache entry not found [url: http://127.0.0.1/lib/chttpclient.jar, version: null]
network: Connecting http://127.0.0.1/lib/chttpclient.jar with proxy=DIRECT
network: CleanupThread used 2 us
network: Downloading resource: http://127.0.0.1/lib/chttpclient.jar
Content-Length: 360 578
Content-Encoding: null
network: Cache entry not found [url: http://127.0.0.1/, version: null]
network: Cache entry not found [url: http://127.0.0.1/jfileupload/upload/client/MApplet.class, version: null]
network: Connecting http://127.0.0.1/jfileupload/upload/client/MApplet.class with proxy=DIRECT
network: Cache entry not found [url: http://127.0.0.1/jfileupload/upload/client/MApplet/class.class, version: null]
network: Connecting http://127.0.0.1/jfileupload/upload/client/MApplet/class.class with proxy=DIRECT
basic: load: class jfileupload.upload.client.MApplet.class not found.
load: class jfileupload.upload.client.MApplet.class not found.
java.lang.ClassNotFoundException: jfileupload.upload.client.MApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.ClassNotFoundException: jfileupload.upload.client.MApplet.class
security: Accessing keys and certificate in Mozilla user profile: null
Trace level set to 5: all ... completed.
but I'm still not able to make it work through the webserver in any way.
thanks, xtas