java.lang.ClassFormatError: Incompatible magic value 2187625

Upload core product.
Post Reply
liu
Posts: 1
Joined: Mon Nov 28, 2011 10:05 am

java.lang.ClassFormatError: Incompatible magic value 2187625

Post by liu »

java.lang.ClassFormatError: Incompatible magic value 218762506 in class file jfileupload/upload/client/MApplet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
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)


The problem I have tried many versions of java jre, but did not work, who knows how to solve it? I use jfileupload2.9, web server environment is centos5.6.

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

Re: java.lang.ClassFormatError: Incompatible magic value 218

Post by support »

This error means JARs files are corrupted. How did you transfer them on server? With FTP? Did you use BINARY mode?

bank2001
Posts: 2
Joined: Fri Dec 02, 2011 3:10 am

Re: java.lang.ClassFormatError: Incompatible magic value 218

Post by bank2001 »

I encountered the same problem。
The same program can work at Windows but on linux error of(java.lang.ClassFormatError: Incompatible magic value 2187625)
I copied The program to the server via the USB disk
please, help!!

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

Re: java.lang.ClassFormatError: Incompatible magic value 218

Post by support »

File get corrupted once downloaded on desktop. Try to access it directly in browser to download it and compare it (binary level) to the original one. Is it the same?

bank2001
Posts: 2
Joined: Fri Dec 02, 2011 3:10 am

Re: java.lang.ClassFormatError: Incompatible magic value 218

Post by bank2001 »

i compared the two files by MD5 . they are the same .
by the way , i rum the Project at linux whit XXXX.war , but at windows not. The form of a folder.
the APServer is weblogic.
This will affect that.

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

Re: java.lang.ClassFormatError: Incompatible magic value 218

Post by support »

Magic value is the class file header. It seems to differ from expected one. It could be :
- A problem of JAR files corrupted but you checked it and it's not that.
- When the applet tries to get an inexistent remote resource and the server reply with a custom 404 HTML page instead of "HTTP/1.0 404 Not Found" error header. In this case the applet do not recognize the alternative 404 page as valid class and generates the error.

Post Reply