Java. lang. ClassCastException: org. apache. catalina. util. Defau

Source: Internet
Author: User


[Java]
07:16:33, 911 ERROR CharsetEncoding: 38-java. lang. ClassCastException: org. apache. catalina. util. DefaultAnnotationProcessor
Org. apache. jasper. JasperException: java. lang. ClassCastException: org. apache. catalina. util. DefaultAnnotationProcessor
At org. apache. jasper. servlet. JspServletWrapper. handleJspException (JspServletWrapper. java: 522)
At org. apache. jasper. servlet. JspServletWrapper. service (JspServletWrapper. java: 356)
At org. apache. jasper. servlet. JspServlet. serviceJspFile (JspServlet. java: 342)
At org. apache. jasper. servlet. JspServlet. service (JspServlet. java: 267)
At javax. servlet. http. HttpServlet. service (HttpServlet. java: 717)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 290)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At com. ****. CharsetEncoding. doFilter (CharsetEncoding. java: 30)
At org. apache. catalina. core. ApplicationFilterChain. internalDoFilter (ApplicationFilterChain. java: 235)
At org. apache. catalina. core. ApplicationFilterChain. doFilter (ApplicationFilterChain. java: 206)
At org. apache. catalina. core. StandardWrapperValve. invoke (StandardWrapperValve. java: 233)
At org. apache. catalina. core. StandardContextValve. invoke (StandardContextValve. java: 191)
At org. apache. catalina. core. StandardHostValve. invoke (StandardHostValve. java: 128)
At org. apache. catalina. valves. ErrorReportValve. invoke (ErrorReportValve. java: 102)
At org. apache. catalina. core. StandardEngineValve. invoke (StandardEngineValve. java: 109)
At org. apache. catalina. connector. CoyoteAdapter. service (CoyoteAdapter. java: 286)
At org. apache. coyote. http11.Http11Processor. process (Http11Processor. java: 845)
At org. apache. coyote. http11.Http11Protocol $ Http11ConnectionHandler. process (Http11Protocol. java: 583)
At org.apache.tomcat.util.net. JIoEndpoint $ Worker. run (JIoEndpoint. java: 447)
At java. lang. Thread. run (Unknown Source)
Caused by: java. lang. ClassCastException: org. apache. catalina. util. DefaultAnnotationProcessor
At org. apache. jasper. runtime. HttpJspBase. init (HttpJspBase. java: 52)

Solution 1:
When the project references catalina under lib under the tomcat directory. when you deploy the project to tomcat using myeclipse, the catalina. add the jar package to the lib folder under the project's web-inf, so that this package will be associated with catalina. if the jar package conflicts, java is reported. lang. classCastException: org. apache. catalina. util. defaultAnnotationProcessor error. The solution is to deploy the project under tomcat and then deploy catalina under web-inf/lib of the project. delete the jar file and restart tomcat. OK.

Solution 2:
Modified the context. xml file in tomcat and added it to the context element.
<Context>
<Loader delegate = "true"/>


Author: yjflinchong

Related Article

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.