This content has been marked as final. Show 3 replies
A "Bad Magic Number" is an indication that the class file of the applet is corrupted in one way or another. Or in a more extreme case, the JVM may be corrupt.
When placing your files on the server, do you use an FTP program? If so, you may have to upload your files in the BINARY mode of your FTP program. If you upload a *.class file in ASCII mode, you'll get a "Bad Magic Number" error.
Solutions? Try to recompile your applet in and upload it using the method above.
PS: If you need any more help or information, please feel free to contact me.
the problem was not with the class files. It appeared only when i put them (the jar ) in the iplanet 6.0 application server context. On the web server they were ( and are ) working just fine.
The reason of Bad Magic Number in this case has to be something different, I guess.
Tell me one thing, if the class files are found in the jar, does it also searches for the files on the disk. i.e. if the files are available in the jar and another copy (may be of different version) is available on disk, would it be a problem ?
I'm planing a try with only jar files present over there and nothing (no more extra copies of class files).
Please give it a thought and revert back...
Yes, you should be able to run your apps with just JAR files. And as for your Web server "Bad Magic Number" errors, serveral things may be possible:
-The way you archive your classes in the JAR file may be incorrect (highly unlikely... but then again, stranger things have happened)
-The app server and the web server don't support the same types of files
-Perhaps the app server and the web server are running different JVMs (just a thought...)
-Or maybe the JDK that you're running is different on the two servers
I hope this helps somewhat. If you need more information, I found that when I searched using "Google" using the query:
Java "Bad Magic Number" jar archives
Seems to return some good results.