Spring Webapp throws 404 errors without console log

I am working on a web application using the Spring and Hibernate framework. My problem is that I often get 404 errors caused by an error that I made somewhere in the codebase, but there are no error messages in the console. Because of this, I struggle to find where the error is, because the project has become very large, and manually trying to find the problem is impractical. I assume Spring is causing the problem, so my question is: is there a way to include more verbose error messages? Thanks

+3
source share
4 answers

The problem was that there were a few missing annotations from one of my Hibernate objects. Following the procedure from the link below, she helped track it by providing more detailed error messages:

http://www.captaindebug.com/2011/07/using-hibernate-validation-annotation.html

0
source

404 is an http error, and only your web server can know about it. It is likely that with these failed requests, your application server or Spring container never hit. Search the web server logs to determine the problem.

Troubleshooting 404 on the IIS Server

http://blogs.iis.net/tomkmvp/archive/2009/04/27/troubleshooting-a-404.aspx

Troubleshooting 404 on the RAD Web Server

http://www-304.ibm.com/support/docview.wss?uid=swg27035752&aid=1

0
source

, , , (, 404) Servlet, Spring, , , , , , , Spring .

, - , , Spring, : http://steveliles.imtqy.com/configuring_global_exception_handling_in_spring_mvc.html

, , , , . , . , , Spring HandlerExceptionResolver Ordered, , :

import org.springframework.core.*;
import org.springframework.web.servlet.*

public class LoggingHandlerExceptionResolver 
implements HandlerExceptionResolver, Ordered {
    public int getOrder() {
        return Integer.MIN_VALUE; // we're first in line, yay!
    }

    public ModelAndView resolveException(
        HttpServletRequest aReq, HttpServletResponse aRes,
        Object aHandler, Exception anExc
    ) {
        anExc.printStackTrace(); // again, you can do better than this ;)
        return null; // trigger other HandlerExceptionResolver's
    }
}
0

404.

Saint, :   , (, 404) Servlet

"spring -framework-reference-3.2.3.pdf" → 1.3 → Logging → Using Log4J, .

0
source

All Articles