0

I have a project using spring MVC.

  • The request is recieved correctly.
  • The dispatcher servlet correctly maps the request to the controller.
  • The controller correctly processes the request and generates the proper response
  • The model-map is populated and the correct view is returned
  • At this point spring magic kicks in and I lose track of the specifics of what's going on.

On the client-side, the response (via firebug) is a 500 error and nothing else. Without firebug my client just hangs.

I have no idea how I can debug the dispatcher servlet, and figure out what the problem is. I can't step through the spring binaries with a debugger, and it's not throwing any sort of exception so I can't look at a stack trace. All I have to look at are configuration files which, i'm almost 100% certain are fine.

What steps can I take to debug this problem? What tools or approaches can I use?

Details: I'm using Eclipse IDE, Java EE 7 and an ant script to build the project. I'm deploying to tomcat 7.

tereško
  • 58,060
  • 25
  • 98
  • 150
Paul
  • 3,318
  • 8
  • 36
  • 60
  • Are you using an IDE? Which one? Are you using Maven? Download the source jars and then you will be able to step through it. – Sotirios Delimanolis Jan 07 '14 at 14:36
  • Is downloading the source-jars the next reasonable step in debugging this problem, or are you just adding that comment because I mentioned stepping through the code? – Paul Jan 07 '14 at 14:42
  • No, just for stepping through the code. You should also set your logger to debug and check what gets logged. Spring has very good log statements. – Sotirios Delimanolis Jan 07 '14 at 14:43
  • I've been checking the tomcat logs and I'm getting nothing about spring at all... is there another log i should be checking?? – Paul Jan 07 '14 at 14:46
  • What's the output of catalina.out? You should be seeing a stacktrace in it. – Jason Nichols Jan 07 '14 at 14:47

0 Answers0