Page 1 of 1

java.lang.ClassFormatError: Incompatible magic value 2187625

Posted: Mon Nov 28, 2011 10:15 am
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.

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

Posted: Tue Nov 29, 2011 7:22 am
by support
This error means JARs files are corrupted. How did you transfer them on server? With FTP? Did you use BINARY mode?

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

Posted: Fri Dec 02, 2011 3:22 am
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!!

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

Posted: Fri Dec 02, 2011 7:31 pm
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?

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

Posted: Sat Dec 03, 2011 3:26 am
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.

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

Posted: Sun Dec 04, 2011 11:39 am
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.