Java.lang.ClassCastException:org.apache.catalina.util.DefaultAnnotationProcessor cannot be cast to O

Source: Internet
Author: User

Testing comet technology in Tomcat results in the engineering error,

[Java] view plain copy Org.apache.jasper.jasperexception:java.lang.classcastexception:o Rg.apache.catalina.util.DefaultAnnotationProcessor cannot is cast to org.apache.AnnotationProcessor at ORG.A Pache.jasper.servlet.JspServletWrapper.handleJspException (jspservletwrapper.java:522) at ORG.APACHE.JASPER.S Ervlet. Jspservletwrapper.service (jspservletwrapper.java:356)

Later checked on the internet, need

[Java] view plain copy modifies the context.xml file in Tomcat, adding <loader under the context element delegate= "true"/>

But I have a local problem, the following is OK, no error,

[Java]  View plain copy <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>  

It still goes wrong.

[Java]  View plain copy <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>  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.