项目

一般

简介

应用部署异常:java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

由 何 善才 在 大约一年 之前添加

应用部署时启动抛以下异常:

[2023-10-26T14:26:59] [] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=61 _ThreadName=ApusicLogManager] [timeMillis: 1698301619374] [levelValue: 900] [[

  StandardWrapperValve[cas]: Servlet.service() for servlet cas threw exception

java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

    at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:982)

    at org.apache.jsp.WEB_002dINF.view.jsp.default_.ui.casLoginView_jsp._jspService(org.apache.jsp.WEB_002dINF.view.jsp.default_.ui.casLoginView_jsp:243)

    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)

    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:432)

    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:336)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1579)

    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:779)

    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:643)

    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:479)

    at org.apache.catalina.core.ApplicationDispatcher.doDispatch(ApplicationDispatcher.java:450)

    at org.apache.catalina.core.ApplicationDispatcher.dispatch(ApplicationDispatcher.java:332)

    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:282)

    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)

    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)

    at org.springframework.webflow.mvc.servlet.ServletMvcView.doRender(ServletMvcView.java:55)

    at org.springframework.webflow.mvc.view.AbstractMvcView.render(AbstractMvcView.java:196)

    at org.springframework.webflow.engine.ViewState.render(ViewState.java:293)

    at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:185)

    at org.springframework.webflow.engine.State.enter(State.java:194)

    at org.springframework.webflow.engine.Transition.execute(Transition.java:228)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)

    at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)

    at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)

    at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)

    at org.springframework.webflow.engine.State.enter(State.java:194)

    at org.springframework.webflow.engine.Transition.execute(Transition.java:228)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)

    at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)

    at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)

    at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)

    at org.springframework.webflow.engine.State.enter(State.java:194)

    at org.springframework.webflow.engine.Transition.execute(Transition.java:228)

    at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)

    at org.springframework.webflow.engine.State.enter(State.java:194)

    at org.springframework.webflow.engine.Transition.execute(Transition.java:228)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.execute(FlowExecutionImpl.java:395)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.execute(RequestControlContextImpl.java:214)

    at org.springframework.webflow.engine.TransitionableState.handleEvent(TransitionableState.java:116)

    at org.springframework.webflow.engine.Flow.handleEvent(Flow.java:547)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.handleEvent(FlowExecutionImpl.java:390)

    at org.springframework.webflow.engine.impl.RequestControlContextImpl.handleEvent(RequestControlContextImpl.java:210)

    at org.springframework.webflow.engine.ActionState.doEnter(ActionState.java:105)

    at org.springframework.webflow.engine.State.enter(State.java:194)

    at org.springframework.webflow.engine.Flow.start(Flow.java:527)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:368)

    at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:223)

    at org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:140)

    at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:238)

    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)

    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)

    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)

    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)

    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1579)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:297)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)

    at org.jasig.cas.security.RequestParameterPolicyEnforcementFilter.doFilter(RequestParameterPolicyEnforcementFilter.java:250)

    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)

    at org.jasig.inspektr.common.web.ClientInfoThreadLocalFilter.doFilter(ClientInfoThreadLocalFilter.java:62)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)

    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)

    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:209)

    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:167)

    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:215)

    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:119)

    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)

    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:550)

    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:75)

    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:114)

    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:458)

    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:209)

    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:327)

    at com.apusic.enterprise.v10.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:439)

    at com.apusic.enterprise.v10.services.impl.ContainerMapper.service(ContainerMapper.java:144)

    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:177)

    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:154)

    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:263)

    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:95)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:261)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:178)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:110)

    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:89)

    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:53)

    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:549)

    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:89)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:94)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:33)

    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:114)

    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:569)

    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:549)

    at java.lang.Thread.run(Thread.java:750)

解决:与中间的类冲突了

将应用的两个jar删除:jsp-api-2.1.jar、servlet-api-2.3.jar