已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno

简介: 已解决:An error occurred at line: 1 in the generated java file The type java.io.ObjectInputStream canno

tomcat报错

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
HTTP Status 500 - org.apache.jasper.JasperException: Unable to load class for JSP
type Exception report

message org.apache.jasper.JasperException: Unable to load class for JSP

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

exception

org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to load class for JSP
  org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:161)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
  org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
  com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
  org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
  org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
  org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
  org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

org.apache.jasper.JasperException: Unable to load class for JSP
  org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:630)
  org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
  org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
  com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
  org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
  org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
  org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
  org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
root cause

java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.jsp.frame.error_jsp
  java.net.URLClassLoader.findClass(URLClassLoader.java:382)
  org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
  org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
  org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:628)
  org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:149)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:340)
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
  org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:164)
  org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:191)
  com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:372)
  com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276)
  org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)
  org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:575)
  org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:81)
  org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)
  org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
  org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.

原因是tomcat和jdk的版本不兼容 更换jdk或者tomcat即可

目录
相关文章
|
1月前
|
存储 缓存 Java
java基础:IO流 理论与代码示例(详解、idea设置统一utf-8编码问题)
这篇文章详细介绍了Java中的IO流,包括字符与字节的概念、编码格式、File类的使用、IO流的分类和原理,以及通过代码示例展示了各种流的应用,如节点流、处理流、缓存流、转换流、对象流和随机访问文件流。同时,还探讨了IDEA中设置项目编码格式的方法,以及如何处理序列化和反序列化问题。
67 1
java基础:IO流 理论与代码示例(详解、idea设置统一utf-8编码问题)
|
17天前
|
Java 编译器 Maven
Java“class file contains wrong class”解决
当Java程序运行时出现“class file contains wrong class”错误,通常是因为类文件与预期的类名不匹配。解决方法包括:1. 确保类名和文件名一致;2. 清理并重新编译项目;3. 检查包声明是否正确。
|
1月前
|
Java
让星星⭐月亮告诉你,Java异常分类[Throwable(Error/Exception(RuntimeException/其他异常)) 检查时异常 非检查时异常]
本文深入解析了Java异常处理机制,重点介绍了`Throwable`类及其子类`Error`和`Exception`,并通过实例代码、流程图和表格详细解释了异常的分类、区别及处理方法,帮助读者掌握异常处理的关键技巧,提升程序的稳定性和健壮性。
47 1
|
1月前
|
Java 数据处理 开发者
揭秘Java IO流:字节流与字符流的神秘面纱!
揭秘Java IO流:字节流与字符流的神秘面纱!
35 1
|
1月前
|
自然语言处理 Java 数据处理
Java IO流全解析:字节流和字符流的区别与联系!
Java IO流全解析:字节流和字符流的区别与联系!
75 1
|
29天前
|
Java
Java 中 IO 流的分类详解
【10月更文挑战第10天】不同类型的 IO 流具有不同的特点和适用场景,我们可以根据具体的需求选择合适的流来进行数据的输入和输出操作。在实际应用中,还可以通过组合使用多种流来实现更复杂的功能。
44 0
|
2月前
|
Oracle Java 关系型数据库
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
如果遇到"exec format error"问题,文章建议先检查Linux操作系统是32位还是64位,并确保安装了与系统匹配的JDK版本。如果系统是64位的,但出现了错误,可能是因为下载了错误的JDK版本。文章提供了一个链接,指向Oracle官网上的JDK 17 Linux版本下载页面,并附有截图说明。
Linux下JDK环境的配置及 bash: /usr/local/java/bin/java: cannot execute binary file: exec format error问题的解决
|
1月前
|
Java
Error:java: 无效的目标发行版: 11解决方案
Error:java: 无效的目标发行版: 11解决方案
71 0
|
1月前
|
存储 Java 程序员
【Java】文件IO
【Java】文件IO
35 0
|
2月前
|
Java
6-17|java error
6-17|java error