java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessor
程序员文章站
2022-07-03 10:43:21
...
在tomcat 中测试comet技术,结果工程出现这样的错误,
- org.apache.jasper.JasperException: java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to org.apache.AnnotationProcessor
- at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
- at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
后来网上查了下,需要
- 修改了tomcat里的context.xml文件,在context 元素下添加
- <Loader delegate="true" />
但是我本地有点问题 ,下面这样子可以,不会报错,
- <Context>
- <Loader delegate="true" />
- <!-- Default set of monitored resources -->
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- <!-- Uncomment this to disable session persistence across Tomcat restarts -->
- <!--
- <Manager pathname="" />
- -->
- <!-- Uncomment this to enable Comet connection tacking (provides events
- on session expiration as well as webapp lifecycle) -->
- <!--
- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
- -->
- </Context>
<Loader delegate="true" /> 要置于其他配置之前,否则依旧会出错。
这样子依然会出错
- <Context>
- <!-- Default set of monitored resources -->
- <WatchedResource>WEB-INF/web.xml</WatchedResource>
- <!-- Uncomment this to disable session persistence across Tomcat restarts -->
- <!--
- <Manager pathname="" />
- -->
- <!-- Uncomment this to enable Comet connection tacking (provides events
- on session expiration as well as webapp lifecycle) -->
- <!--
- <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
- -->
- <Loader delegate="true" />
- </Context>
转自http://blog.csdn.net/xiaxiaorui2003/article/details/5735328 感谢!
上一篇: Apache Derby Network Server - 10.2.2.0 - (485682) 已启动并且已准备好 2008-08-22 02:11:53.
下一篇: Tomcat问题很无助的时候记得清缓存!
推荐阅读
-
spring boot从redis取缓存发生java.lang.ClassCastException异常
-
java.lang.ClassCastException: org.jboss.logging.appender.Dai JBossJavaXMLWeb
-
dubbo java.lang.ClassCastException: java.lang.String cannot be cast to java.lan
-
dubbo java.lang.ClassCastException: java.lang.String cannot be cast to java.lan
-
java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessor
-
java.lang.ClassCastException: java.util.ArrayList cannot be cast to com.github.pagehelper.Page
-
整合SSH java.lang.ClassCastException: xxx_$$_javassist_0 cannot be cast to javassist.util.proxy.Proxy
-
spring boot从redis取缓存发生java.lang.ClassCastException异常
-
java.lang.ClassCastException: weblogic.net.http.SOAPHttpsURLConnection cannot be
-
android ListView分页出现java.lang.ClassCastException