日期:2014-05-18  浏览次数:20773 次

请大家看这个这个错误是什么意思呢?
我用jdk1.5+tomcat5,做JSP网页,
但是总出错,下面是错误提示
type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP

Generated   servlet   error:
D:\Program   Files\Tomcat   5.0\work\Catalina\localhost\_\org\apache\jsp\meihuatree_jsp.java:7:   cannot   access   java.lang.Object


Generated   servlet   error:
bad   class   file:   D:\Program   Files\j2sdk\jre\lib\rt.jar(java/lang/Object.class)
class   file   has   wrong   version   49.0,   should   be   48.0
Please   remove   or   make   sure   it   appears   in   the   correct   subdirectory   of   the   classpath.
public   final   class   meihuatree_jsp   extends   org.apache.jasper.runtime.HttpJspBase
                          ^
1   error


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.27   logs.


请问到底是什么意思呢?
怎么解决?


------解决方案--------------------
这个问题,我以前碰到过,楼上说的都是错误的。这是属于jdk版本的原因。到网上帮你查了下。

这是因为编译环境和运行环境的不一致造成的,比如tomcat5.5和jdk1.5配合的时候,可能就会出现。解决这个问题的方法:copy jdk1.5的lib/tools.jar到tomcat5.5的common/lib/tools.jar,覆盖掉原有文件就可以了。
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html