>>Hi,
>>
>>I have the problem with running a simple servlet on an Apache
>>Server with
>>Tomcat 3.3.1
>>I wrote the servlet in Visual Age for Java 3.5 and exported the
>>.CLASS
>>file
>>into the proper directory on Apache. I then try to test it out
>>by calling
>>the servlet from an HTML page. An error occurs and the only
>>thing I
>>got back
>>is the error below that I found in the log file.
>>I tried looking over the servlet code and everything seems to be
>>declared
>>appropriately and defined. The call from the HTML page is just
>> from
>>the FORM
>>action attribute...calling the servlet
>>
>>
>>java.lang.ClassFormatError: Wrong name
>>at java.lang.ClassLoader.defineClass(ClassLoader.java:219)
>>at org.apache.java.lang.AdaptiveClassLoader.loadClass(Compiled
>>Code)
>>at java.lang.ClassLoader.loadClass(ClassLoader.java:154)
>>at
>>org.apache.jserv.JServServletManager.load_init(JServServletManager.java)
>>at org.apache.jserv.JServServletManager.loadServlet(Compiled
>>Code)
>>at org.apache.jserv.JServConnection.processRequest(Compiled
>>Code)
>>at org.apache.jserv.JServConnection.run(Compiled Code)
>>at java.lang.Thread.run(Compiled Code)

hi folks...
java doc from sun has fol explanation of ClassFormatError
- Thrown when the Java Virtual Machine attempts to read a class
file and determines that the file is malformed or otherwise cannot
be interpreted as a class file.
so jvm is able to find y'r class file but i guess
some version problem is there.
this is what i obtained from sun java docs guide -
This problem is caused by bytecode generated from old JDK 1.0.2 or
1.1 compilers, which generate bytecode that does not conform to
the Java VM Specification. Since the verifiers in recent J2SE
releases are much stricter about bad class format,
ClassFormatError is thrown by the VM when these bad class files
are loaded.
that means u have compiled y'r classes with older version of jdk
and trying to run them with newer
version of jdk. check out this possibility.
hope this helps
regards
nitin

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to