Crazy Idea

java.lang.VerifyError in a tomcat 7.x webapp
April 25, 2012, 11:46 pm
Filed under: Uncategorized | Tags: , , ,

Ahoy there! 

I have a webapp(built using maven 3.0.3) deployed into Tomcat 7.0.23. After I log into the app, I get this error

javax.servlet.ServletException: java.lang.VerifyError: (class: org/apache/jsp/ChLogin_jsp, method: _jspService signature: (Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) Inconsistent stack height 0 != 1

Just to be sure, the WAR/web-inf/lib folder does not contain either servlet/jsp/jstl libraries. I also don’t precompile any of the JSP files.

Here’s the sequence 

1) user goes to login.jsp page using a GET request . This works just fine

2) user enters credentials and submits it to jsp2 using a POST request

3) java.lang.VerifyError happens when jsp2 constructor is being invoked by the servlet engine.

What is the problem ? what should I be checking for ?

Just so you know, this webapp works just fine if I deploy it into Tomcat 5.5 (I just have to add jstl to the dependencies)

Thank you,