tomcat 启动正常,网站确HTTP Status 500 错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了tomcat 启动正常,网站确HTTP Status 500 错误相关的知识,希望对你有一定的参考价值。

HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:527)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:359)
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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
com.huafeng.web.listens.TransmitFilter.doFilter(TransmitFilter.java:51)

root cause
java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
org.apache.jsp.login_jsp._jspInit(login_jsp.java:24)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)
com.huafeng.web.listens.TransmitFilter.doFilter(TransmitFilter.java:51)

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

--------------------------------------------------------------------------------
Apache Tomcat/6.0.26

解决方法:项目目录下的WEB-INF/lib里面的jar包有冲突,把他们删除就行了。
如果是别的地方移过来的程序 删除里面的 catalina.jar 重新启动 tomcat
参考技术A 端口被占用了,你到tomcat的目录下,有一个server.xml文件,把里面的商品修改下,然后重启下试试追问

可以肯定 不是端口被占用,我tomcat启动 没有报错 亲。只是访问程序出现那个。

参考技术B 看错误提示:org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor

这问题网上有好多成功解决的例子
ava.lang.ClassCastException: org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
参考技术C com.huafeng.web.listens.TransmitFilter.doFilter(TransmitFilter.java:51)
,这个应该是你自己的代码,看看这里有什么问题。追问

111

以上是关于tomcat 启动正常,网站确HTTP Status 500 错误的主要内容,如果未能解决你的问题,请参考以下文章

eclipse正常启动tomcat, 访问http://localhost:8080 却报404错误

Tomcat无法正常启动

tomcat正常启动后,在地址栏中输入http://localhost:8080/ 出现HTTP404错误找不到网页

eclipse启动tomcat, http://localhost:8080无法访问

tomcat 正常启动但不能访问

tomcat HTTP 500错误