Skip to content

Debugging Spring MVC Startup Errors In Tomcat

I’ve been getting startup errors trying to deploy this spring MVC application:

SEVERE: Error listenerStart

I can’t find the error in the logs since this is a container start up error.

Here’s what I did:

  • Prequisite: attach the spring src
  • Put a breakpoint in the ContextLoaderListener:
    in the spring jar on the build path, find org.springframework.web.context and the ContextLoaderListener class. Set a breakpoint at line 49, which will read this.contextLoader.initWebApplicationContext(event .getServletContext());
  • When it reaches the breakpoint, you can Step Over it once, and then check your variables for a BeanInitializationException object named “t”. Then you can find the source of the problem in the exception.

If only more things in life were so easy…

I found this here

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*