tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Layman <randy.lay...@aswethink.com>
Subject RE: Invalid class file format for JSP import
Date Wed, 09 Jan 2002 13:52:17 GMT

	This looks like you are using JDK 1.2 or 1.3 to run Tomcat, but
using JDK 1.4 to compile your classes.  With the new JDK Sun changed the
file format version and classes compiled with the new JDK are not backwards
compatible.  I believe there is a command like switch to JavaC (something
like -version) to switch to the older class file format.

	Randy

> -----Original Message-----
> From: Larry Isaacs [mailto:Larry.Isaacs@sas.com]
> Sent: Wednesday, January 09, 2002 9:24 AM
> To: 'Tomcat Users List'
> Subject: RE: Invalid class file format for JSP import
> 
> 
> I can't tell if this is a reloading issue.  Has
> Tomcat been restarted?  You might also need to
> delete the work directory if something has gotten
> out of sync.
> 
> Is says it can't compile JSPerror.  Where is JSPerror
> in the picture?
> 
> Larry
> 
> > -----Original Message-----
> > From: Egil Rian [mailto:egil_rian@hotmail.com]
> > Sent: Tuesday, January 08, 2002 7:51 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Invalid class file format for JSP import
> > 
> > 
> > Hi,
> > 
> > I am having trouble using a self-defined class called 
> > User.class (part of a 
> > package called login).
> > The import directive I use in my JSP file is
> > <%@ page language="java" import="login.*"%>
> > The location of User.class is
> > jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes\login
> > Tomcat version: 3.2.3
> > JDK version: 1.4.0_beta2
> > I am not using a .jar file for my class files.
> > I heard that the problem goes away if I use Tomcat 4.0, but I 
> > have to stick 
> > with this version. Here is the error output:
> > 
> > Error: 500
> > Location: /examples/jsp/login/results.jsp
> > Internal Servlet Error:
> > org.apache.jasper.JasperException: Unable to compile class 
> > for JSPerror: 
> > Invalid class file format:
> > C:\jakarta-tomcat-3.2.3\webapps\examples\WEB-INF\classes\login
> > \User.class, 
> > wrong version: 46, expected 45
> > 
> > What is this 'version 45'? How do I make my file version 45?
> > I would appreciate any help explaining why the compiler 
> > complains, and how 
> > to resolve the problem.
> > 
> > Thanks, Egil
> > 
> > 
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > Egil Rian
> > San Francisco, CA 94131
> > 
> > 
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at 
> > http://explorer.msn.com/intl.asp.
> > 
> > 
> > --
> > To unsubscribe:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> > Troubles with the list: 
> <mailto:tomcat-user-owner@jakarta.apache.org>
> > 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message