Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bad magic number

4 views
Skip to first unread message

Steve Slatcher

unread,
Feb 6, 1999, 3:00:00 AM2/6/99
to
I have writen a simple applet that uses the Java Project X XML
library. I put the applet on a local server and it works fine using
appletviewer, presumably because it is picking up the XML library
classes from my JRE tree. However, when I try the same with MSIE, I
always get 'Bad magic number' errors for the library classes. I get
the same errors if the libary class files are absent from my htdocs
directory, and if the files are precisely where the console reports
they are being looked (e.g.
for.http://127.0.0.1/Whereabouts/org/xml/sax/SAXException.class)

I fear that I have a fundamental misunderstanding about how these
libraries should be installed on a server. Could some kind person
please enlighten me.

Many thanks

Steve Slatcher
=============================================================

Console output:
Java(TM) Plug-in
Using JRE version 1.2
User home directory = C:\WINDOWS\Profiles\ss
Proxy Configuration: no proxy
JAR cache enabled.
Opening http://127.0.0.1/Whereabouts/Test.class no proxy
No holding
CacheHandler trying caching. http://127.0.0.1/Whereabouts/Test.class
CacheHandler file name: E:\Temporary Internet
Files\8T6VSTQN\Test.class
Got cached copy
Opening http://127.0.0.1/Whereabouts/org/xml/sax/SAXException.class no
proxy
No holding
CacheHandler trying caching.
http://127.0.0.1/Whereabouts/org/xml/sax/SAXException.class
CacheHandler file name: null
No cache available, using remote copy
Opening http://127.0.0.1/Whereabouts/org/xml/sax/SAXException.class no
proxy
java.lang.ClassFormatError: org/xml/sax/SAXException (Bad magic
number)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:403)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:101)
at
sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:144)
at java.lang.ClassLoader.loadClass(ClassLoader.java:280)
at
sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:110)
at java.lang.ClassLoader.loadClass(ClassLoader.java:237)
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:239)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:532)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:759)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:468)
at sun.applet.AppletPanel.run(Compiled Code)
at java.lang.Thread.run(Thread.java:479)


---
Steve Slatcher
http://pobox.com/~steve.slatcher

Roedy Green

unread,
Feb 6, 1999, 3:00:00 AM2/6/99
to
See "bad magic number" in the Java gotchas error messages section.
http://mindprod.com/gotchas.html#ERRORMESSAGES

For the JAVA GLOSSARY and the CMP Utilities: <http://mindprod.com>
--
Roedy Green, Canadian Mind Products
-30-

0 new messages