Jimage upload not loading

Image previewer add-on.
kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Jimage upload not loading

Post by kkalsan »

Hi,

I am using linux server. The java applet initiation get failed in my system and I get the following message.

####################################
Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\kkalsan


----------------------------------------------------
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
p: reload proxy configuration
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>
----------------------------------------------------

Feb 7, 2009 9:44:35 AM jfileupload.upload.client.MApplet <init>
INFO: JFileUpload 2.1 Build FINAL.001
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E C
INFO: Auto-detect proxy settings : host = 192.168.1.220
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E C
INFO: Auto-detect proxy settings : port = 8080
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E O
INFO: HTTP proxy enabled : 192.168.1.220:8080
java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/G
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at jfileupload.transfer.client.util.Conf.D(Unknown Source)
at jfileupload.upload.client.MApplet.loadUI(Unknown Source)
at jfileupload.upload.client.MApplet.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

#######################################################

Please suggest the solution for this issue.

Look forward to hear from you.

Thanks,
Kalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload not loading

Post by support »

First make sure you have the following JAR files in fileupload/lib/ folder:
- For FTP upload:
clogging.jar, cnet.jar, ftpimpl.jar, jfileupload.jar, previewui.jar
- For HTTP upload:
chttpclient.jar, clogging.jar, httpimpl.jar, jfileupload.jar, previewui.jar

Then make sure you have the following file in fileupload/
i18n_bar.properties
i18n_pane.properties
applet_http_ipreview.js
applet_http_ipreview.html

Assuming you're using HTTP upload then update applet_http_ipreview.js to setup "url" parameter with the server-script URL that will handle upload.

Does it help ? The error you have means that on of the JAR file is not found.

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload not loading

Post by kkalsan »

Hi,

Thank you for the prompt response.

I would like to inform you that I am using the http upload Method.
Please find my response below:

1. JAR file: I have checked and all the mentioned Jar files are present in the directory 'fileupload/lib'. I would also like to mention that the Jar files are uploaded in binary mode.
2. Properties file: i18n_bar.properties, i18n_pane.properties are present in the 'fileupload/' folder and are opening in the browser through there complete url.
3. I have set the URL parameter with the complete path to the 'process.php' for processing file upload.

I have tried all the solutions provided by you, however It is not working.
does the error suggest the path to the JAR file is correct but the file not found. or path is incorrect itself?

Please suggest.

Looking forward for your response.

Thanks,
Kalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload not loading

Post by support »

Do you have an URL I could check from here ?

Also, if you test the applet locally, does it work ?

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload not loading

Post by kkalsan »

Hi,

Yes I the same, code is running successfully locally and on another remote server as well.
please find below the URL:

http://www.wikipixr.com/homes/upload_image

select the multiple upload option to load the applet.

login: test
Passowrd: test1234

Looking forward to hear from you.

Thanks,
kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload not loading

Post by support »

I think there is a problem in the JavaScript you've modified. You've mixed some parameters.
Start again from the JavaScript available in JImageUpload and modify on the section after:
// BEGIN: Update parameters below for INTERNET EXPLORER, FIREFOX, SAFARI, OPERA, MOZILLA, NETSCAPE 6+ support.

Also, the "url" parameter ends with process.php?newfolder= but it seems there is no value after the = so it fails when I try to upload.

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload not loading

Post by kkalsan »

Hi,

Thanks for the response.

Please check the applet again, The java script is same but the source path to code base and JAR files is changed to some other remote server. It is working fine. But its only causing problem when I provide path to wikipixr.com server.

Please suggest what may be the cause.

Look forward for your reply.

Thanks,
Kalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload not loading

Post by support »

The applet is loading now from here. However, upload is not working. I get Invalid URI error for the following lines:

Code: Select all

document.writeln('<PARAM NAME="url" VALUE="http://www.sampatti.com/wikipxr/app/webroot/js/upload/process.php?newfolder=');
document.write(document.getElementById('ImageSessid').value);
document.write('"');
The upload URL generated above seems not valid. Could you check it ?

Also, you said you had an error when you host JAR files on wikipixr.com ? What error do you have ?

kkalsan
Posts: 10
Joined: Sat Feb 07, 2009 4:14 am

Re: Jimage upload not loading

Post by kkalsan »

Hi,

Yes you are correct applet is loading.
FIles are not uploading because the URL provided is on another remote server.

I just want the applet to get loaded. I have used this code on my remote server and local server.
It worked fine on both of them except the wikipixr.com server where I currently wish to integrate.

The only change I made is to the path of the CODE BASE and JAR files.

The Error I obtain on wikipixr.com is below:

###########################################

Java Plug-in 1.6.0_01
Using JRE version 1.6.0_01 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\kkalsan


----------------------------------------------------
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
p: reload proxy configuration
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>
----------------------------------------------------

Feb 7, 2009 9:44:35 AM jfileupload.upload.client.MApplet <init>
INFO: JFileUpload 2.1 Build FINAL.001
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E C
INFO: Auto-detect proxy settings : host = 192.168.1.220
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E C
INFO: Auto-detect proxy settings : port = 8080
Feb 7, 2009 9:44:41 AM jfileupload.transfer.client.http.E O
INFO: HTTP proxy enabled : 192.168.1.220:8080
java.lang.NoClassDefFoundError: jfileupload/transfer/client/core/G
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at jfileupload.transfer.client.util.Conf.D(Unknown Source)
at jfileupload.upload.client.MApplet.loadUI(Unknown Source)
at jfileupload.upload.client.MApplet.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

######################################################

I am not able to understand the what is interrupting the applet to load.
Please provide some solution.

Look forward to hear from you.

Thanks,
kkalsan

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Jimage upload not loading

Post by support »

Are you sure wikipixr.com web server is enabled to serve JAR files ?
To make sure, try to access a JAR file directly in your browser. For instance:
http://www.wikipixr.com/something/lib/jfileupload.jar

Another question : Why do you need to modify codebase ? Default is "./" and works in most configurations. Same for ARCHIVE parameters which include path to JAR files.

Post Reply