新部署tomcat,An error occurred at line: [1] index_jsp.java
环境:
centos6.5 32位
oracle jdk 1.8
tomcat 7
问题:
yum install tomcat后,返回如下错误:
[root@centos]~# curl -v http://localhost:8080 * About to connect() to localhost port (#) * Trying 127.0.0.1... connected * Connected to localhost (127.0.0.1) port (#) > GET / HTTP/1.1 > User-Agent: curl/7.19. (i386-redhat-linux-gnu) libcurl/7.19. NSS/3.21 Basic ECC zlib/1.2. libidn/1.18 libssh2/1.4. > Host: localhost: > Accept: */* > < HTTP/1.1 500 Internal Server Error < Server: Apache-Coyote/1.1 < Content-Type: text/html;charset=utf-8 < Content-Language: en < Content-Length: 2655 < Date: Thu, 15 Sep 2016 03:03:16 GMT < Connection: close < <html><head><title>Apache Tomcat/7.0.65 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - Unable to compile class for JSP: </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u>Unable to compile class for JSP: </u></p><p><b>description</b> <u>The server encountered an internal error that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: [1] in the generated java file: [/usr/share/tomcat/work/Catalina/localhost/_/org/apache/jsp/index_jsp.java] The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files An error occurred at line: [1] in the generated java file: [/usr/share/tomcat/work/Catalina/localhost/_/org/apache/jsp/index_jsp.java] 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:103) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:366) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:466) org.apache.jasper.compiler.Compiler.compile(Compiler.java:379) org.apache.jasper.compiler.Compiler.compile(Compiler.java:354) org.apache.jasper.compiler.Compiler.compile(Compiler.java:341) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339) javax.servlet.http.HttpServlet.service(HttpServlet.java:731) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) * Closing connection #0 #
网友介绍这是ecj.jar太老了。网友的版本事3.4.2,换4.2后ok。看下自己的ecj
[root@centos]/usr/share/java# ll|grep ecj -rw-r--r-- root root 11月 ecj-3.4..jar lrwxrwxrwx root root 9月 : ecj.jar -> ecj-3.4..jar lrwxrwxrwx root root 9月 : eclipse-ecj-3.4..jar -> ecj-3.4..jar lrwxrwxrwx root root 9月 : eclipse-ecj.jar -> eclipse-ecj-3.4..jar lrwxrwxrwx root root 9月 : jdtcore.jar -> ecj-3.4..jar
果然很老。
那么打开ecj看下, 果然很多编译相关的类啊!
http://wiki.jikexueyuan.com/project/tomcat/classloading.html
用ecj-4.4.2.jar 替换老版本ecj后,重启tomcat,关闭防火墙,访问网页
done
新部署tomcat,An error occurred at line: [1] index_jsp.java的更多相关文章
- An error occurred at line: 1 in the generated java file问题处理
tomcat6启动后,加载jsp页面报错,提示无法将jsp编译为class文件,主要报错信息如下: An error occurred at line: 1 in the generated java ...
- 报错:An error occurred at line: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in ...
- Eclipse无法启动报An internal error occurred during: "reload maven project". java.lang.NullPointerException
由于没有正常关机导致eclipse无法将数据正常写入配置文件导致无法启动.报这样一个异常 An internal error occurred during: "reload maven p ...
- Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
本地原来已经安装了JAVA JDK1.7并配置好了环境变量; 然后又安装了JDK8,想2个版本并存. 然后发现eclipse 打不开,闪退.然后查看环境: 发现 C:\Users\Administra ...
- debian 7 linux 安装jdk出现Error occurred during initialization of VM java/lang/NoClassDefFoun
debian 7 linux 安装jdk出现Error occurred during initialization of VM java/lang/NoClassDefFoun 这两天一直研究lin ...
- 踩坑系列《三》 java -version 报错出现Error occurred during initialization of VM java/lang/NoClassDefFoundError:
之前导入一个项目,因为该项目Spring版本过低,只能适用于1.7版本,装了jdk1.7版本.安装配置好后,打开cmd窗口,执行 java -version 指令发现没像正常一样显示版本信息,而是报了 ...
- tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory
将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题: # ./shutdown.sh Using CATALINA_BASE: /usr/local/tomcat ...
- tomcat报错catalina.sh: line 401: /usr/java/jdk1.7.52/bin/java: No such file or directory(转)
原文:https://blog.csdn.net/reblue520/article/details/52588825 将生产服务器的Tomcat目录打包过来后解压后,启动Tomcat后,发现如下问题 ...
- Maven相关: An internal error occurred during: "Updating Maven Project". java.lang.NullPointerException
I solved mine by delete the .settings folder and .project file in the project and then reimport the ...
随机推荐
- wpf 控件简单介绍
- aps.net国际化本地资源 .resources”正确嵌入或链接到程序集
asp.net国际化提供了资源文件的解决的方式, asp.net自带的两个项目文件夹 分别是:App_GlobalResources和App_LocalResources, App_GlobalRes ...
- 剑指Offer 3. 从尾到头打印链表 (链表)
题目描述 输入一个链表,按链表值从尾到头的顺序返回一个ArrayList. 题目地址 https://www.nowcoder.com/practice/d0267f7f55b3412ba93bd35 ...
- 安装单机CHD5.12报错解决(补充)
一.oozie启动失败 (1) 拷贝mysql的驱动文件. 一个是需要把java的mysql的驱动jar文件拷贝到oozie的lib目录中 /opt/cloudera/parcels/CDH-5.12 ...
- java 中Math 的常用方法
public class Demo{ public static void main(String args[]){ /** *Math.sqrt()//计算平方根 *Math.cbrt()//计算立 ...
- JAVA面向对象设计中类关系
现在看以前描述有点小问题:类之间关系分为继承.泛化.依赖.关联.聚合.聚合关系几种.继承是is a关系,泛化(类实现接口)表示like a关系. 类之间的关系种类: Generalization(泛化 ...
- Eslint 能自动格式化代码,为什么还要用 Prettier?
ESLint 与 Prettier 区别: ESLint:代码检测工具:可以检测出你代码中潜在的问题,比如使用了某个变量却忘记了定义: Prettier:代码格式化工具:作为代码格式化工具,能够统一你 ...
- Git 2.x 中git push时遇到 push.default 警告的解决方法
近在学习使用 git&GitHub,然后今天遇到了一个问题.在执行 git add 和 git commit 操作之后,再进行 git push 操作,出现了如下提示: $ git push ...
- 关于音频总线IIS的学习---Verilog
关于音频总线IIS的学习---Verilog 主要思想: 在分析寄存器的值变化的时候,将时钟的边沿分两边来看,边沿之前,边沿之后,在always 块语句里面用来分析判断的寄存器的值,都应该用边沿变化之 ...
- maya中的顶点平滑算法(vertex smooth algorithm)
继上文继续写.有了顶点迭代器之后就可以利用MItMeshVertex类的getConnectedVertices方法来获取相连点并代入平滑算法. 选择什么样的平滑算法呢?本人比较懒,直接打开了计算机图 ...