首页 新闻 搜索 专区 学院

各位大神帮忙解决下。tomcat可以发布主页可以加载,加载servlet浏览器就会报错。

0
悬赏园豆:50 [已解决问题] 解决于 2016-10-26 15:06

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: 

An error occurred at line: 1 in the generated java file
The type java.io.ObjectInputStream cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
	org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
	org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
	org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:443)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

 

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

控制台报错信息

org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
 at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:372)
 at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:209)
 at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:166)
 at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:102)
 at org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:49)
 at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:122)
 at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:168)
 at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:2376)
 at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1004)
 at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1219)
 at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:528)
 at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:759)
 at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:464)
 at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:433)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:362)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
 at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
 at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:163)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:556)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:402)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:249)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:267)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:245)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:260)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
 at java.lang.Thread.run(Thread.java:745)

之前是一直可以用的,突然有一天就不能用了,我是个初学者也找不到原因

是配置文件问题还是什么情况,求大神赐教;

超级南瓜露的主页 超级南瓜露 | 初学一级 | 园豆:157
提问于:2016-10-25 19:41
< >
分享
最佳答案
0

servlet不能编译成jsp,把你项目clean一下重新编译,或者检查一下javax,jdk有没有正常导入

收获园豆:50
[3] | 小虾三级 |园豆:1174 | 2016-10-25 20:10

xiexie,问题解决了,是端口没有打开

Black_empire | 园豆:203 (菜鸟二级) | 2016-10-25 21:11
其他回答(1)
0

为什么端口没打开会导致JSP编译错误的……这应该跟端口没关系

突破渴望 | 园豆:214 (菜鸟二级) | 2016-10-26 03:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册