Announcement Announcement Module
Collapse
No announcement yet.
Exception in logs when HandlerExceptionResolver completes successfully Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception in logs when HandlerExceptionResolver completes successfully

    I am exposing Spring REST services and in case of exception need to send back an Exception XML. I have implemented HandlerExceptionResolver and configured the same in my application-servlet.xml. This HandlerExceptionResolver returns a model and view that uses JAXB to generate XML output.

    In case of exceptions, my HandlerExceptionResolver executes fine and a proper XML is sent back. However, the following gets printed in (debug) logs, and is followed by exception stack trace:

    10:39:15.202 [qtp17798257-33] DEBUG o.s.web.servlet.DispatcherServlet - Handler execution resulted in exception - forwarding to resolved error view: ModelAndView: reference to view with name 'exceptionXml'; model is {exceptionXml=com.alpha.beta.exception.ExceptionMe ssage@1db7b9
    }

    I understand this is a debug message, but it is confusing. Specially so, because the message "Handler execution resulted in exception" is not clear. What is the handler? Was there an exception in handling the request? Was there an exception in HandlerException?

    Is this message expected? Or have I done somethign wrong? Is there any way I can avoid this message from being printed in logs (other than switching off debug logs for spring?).
Working...
X