简体   繁体   中英

Resolving tomcat proprietaryEvaluate exception on Tomcat 8.0.15 & java 8

I have to switch from an execution environment which is Java 7 & tomcat 7.0.57 to java 8 & tomcat 8.0.15. To do this, I'm testing a webapp which I know that runs well on J7/TOMCAT7. I'm using maven, which is configured to use java 8, and deployment goes well. Meanwhile, I got this exception during execution time when I try to load my home page :

An error occurred at line: 427 in the jsp file: /index.jsp The method proprietaryEvaluate(String, Class, PageContext, ProtectedFunctionMapper, boolean) in the type PageContextImpl is not applicable for the arguments (String, Class, PageContext, null)

Full stacktrace :

Stacktrace: at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:103) at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:199) at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:450) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:361) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:336) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:323) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at ev.resourceManager.easyvols.InnerJSPServlet.service(InnerJSPServlet.java:91) at javax.servlet.http.HttpServlet.service(HttpServlet.java:725) at org.apache.catal ina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537) at org.apache.coyote.http11.AbstractHttp11Processor.process (AbstractHttp11Processor.java:1085) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658) at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1556) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1513) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

Note that I'm not using any framework like Struts or Spring.

What can be the solutions to solve this exception?

I had this same problem when upgrading and the issue was that my deployed WAR included the jasper jar, which it shouldn't. I removed it since Tomcat provides its own (and the method signature in TC8 differs from the version in TC7) and it works now.

I confirm @Toby 's solution. I just add some context element that could help for a diagnostic.

My web app was developped with Tomcat 8.0.35 and Oracle JDK 1.8.0_91.

For meaning of deployment tests, we've chosen to run the app on a RaspberryPi (Raspbian distro : 2016-09-23-raspbian-jessie) which uses Tomcat 8.0.14 and Oracle JDK 1.8.0_65.

We had to "downgrade" the app in order to be compliant with RasPi softwares but experienced many difficulties, each of them pointing only JSPs that used to work before. We first thought about taglib JSTL Core which was a common element for all the JSP's lines pointed with errors, but I can assure there's no need to change anything in the libraries and build path of the project but Jasper package.

Cleaning this element of your POM with resolve everything.

Ensure that the Tomcat work directory is refreshed as this will hold cached files. To do this simply delete the work directory and restart Tomcat.

In our case while migrating from Tomcat 7 to 8.5 the work directory was copied over as well resulting in the given exception. We removed and updated multiple jars in the lib folder and restarted Tomcat multiple times in the process without any success. Cleaning the work directory was the only thing that worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM