[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