1

I'm getting the following error in my IDE when trying to deploy my application. The error goes on for 50 pages so I only attached the most significant part below and a little more at the bottom of this post. The error makes sense but the class throwing it doesn't exist.

Error Message

Apr 25, 2013 12:10:45 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet HomeController threw exception java.lang.StackOverflowError

Problem:

What is strange is that I have deleted the servlet HomeController, removed it from Web.xml, performed a search for all instances of it, and performed a clean and build several times. I still get this error message about an exception being thrown by a non-existent class? I'm guessing some project related file is still referencing this file but it's still very weird.

System Properties

Apache Tomcat 7.014

Netbeans 7.0.1

More of the Error message

Apr 25, 2013 12:10:45 AM org.apache.catalina.core.ApplicationContext log INFO:

The server side component of the HTTP Monitor has detected a java.lang.StackOverflowError. This happens when there is an infinite loop in the web module. Correct the cause of the infinite loop before running the web module again.

Apr 25, 2013 12:10:45 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet HomeController threw exception java.lang.StackOverflowError at org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:895) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572) at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:229) at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:572)

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Usman Mutawakil
  • 4,993
  • 9
  • 43
  • 80
  • It looks to me like Apache is getting into trouble trying to run the missing class. Probably it takes an error trying to run it, then attempts to invoke an error delegate in the class, then (of course) takes an error on that... – Hot Licks Apr 25 '13 at 17:49
  • Yea I'm going to try and deploy to another version of Tomcat to see if I can isolate this a bit more. – Usman Mutawakil Apr 25 '13 at 18:33
  • To expand on my comment: I suspect you HAD deleted the class, but the server still had a management record of some sort that told it to use the (nonexistent) class. So it tried to use the class, and that's where things went south. – Hot Licks Apr 25 '13 at 20:00
  • Yea I figured that but the source of the corruption and the solution were my problem. Deploying to a new tomcat instance solved it for now. – Usman Mutawakil Apr 26 '13 at 04:32

1 Answers1

0

This is one of those "non-linear" errors that doesn't seem to be the direct result of anything I did. I deployed to a new version of Tomcat and the problem is gone. I must assume then that Tomcat has it's own "repository" of classes to execute and that structure is corrupted. Either way I have found a solution. I just hope it doesn't happen on the new version of Tomcat I'm running...

Usman Mutawakil
  • 4,993
  • 9
  • 43
  • 80