Wednesday, November 14, 2007

Tomcat - VerifyError Fix- java.lang.VerifyError: (class: org/apache/jasper/runtime/PageContextImpl

Using Tomcat 5.5.17 after starting application, jsp pages couldn't be rendered and the following error is taken with an empty page. To fix the problem simply check the commons-el.jar versions and also remove geronimo-spec-jsp.jar from WEB-INF\lib directory if this jar is not already excluded:

java.lang.VerifyError: (class: org/apache/jasper/runtime/PageContextImpl, method: getExpressionEvaluator signature: ()Ljavax/servlet/jsp/el/ExpressionEvaluator;) Wrong return type in function
at org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryImpl.java:99)
at org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:61)
at org.apache.jsp.pages.P60.Common.StandardPageParentTemplate_jsp._jspService(StandardPageParentTemplate_jsp.java:87)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)