1
I am following the Caelum booklet. I made the application "hello world" with Spring MVC, which has both the configuration and the respective Controller.
However, when I access the URL localhost:8080/WebSpring/olaMundoSpring
error page 404 appears.
My app code is available on Github:
https://github.com/wladyband/SpringComErro/tree/master/WebSpring
when clicking on the URL does not generate any error in Tomcat
Out 07, 2014 10:12:43 AM org.apache.catalina.core.AprLifecycleListener init
INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Out 07, 2014 10:12:43 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:WebSpring' did not find a matching property.
Out 07, 2014 10:12:43 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["http-bio-8080"]
Out 07, 2014 10:12:43 AM org.apache.coyote.AbstractProtocol init
INFORMAÇÕES: Initializing ProtocolHandler ["ajp-bio-8009"]
Out 07, 2014 10:12:43 AM org.apache.catalina.startup.Catalina load
INFORMAÇÕES: Initialization processed in 962 ms
Out 07, 2014 10:12:43 AM org.apache.catalina.core.StandardService startInternal
INFORMAÇÕES: Starting service Catalina
Out 07, 2014 10:12:43 AM org.apache.catalina.core.StandardEngine startInternal
INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/7.0.55
Out 07, 2014 10:12:46 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: No Spring WebApplicationInitializer types detected on classpath
log4j:WARN No appenders could be found for logger (org.springframework.web.servlet.DispatcherServlet).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Out 07, 2014 10:12:46 AM org.apache.catalina.core.ApplicationContext log
INFORMAÇÕES: Initializing Spring FrameworkServlet 'springmvc'
Out 07, 2014 10:12:47 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["http-bio-8080"]
Out 07, 2014 10:12:47 AM org.apache.coyote.AbstractProtocol start
INFORMAÇÕES: Starting ProtocolHandler ["ajp-bio-8009"]
Out 07, 2014 10:12:47 AM org.apache.catalina.startup.Catalina start
INFORMAÇÕES: Server startup in 3562 ms
I compared your project with a basic example that I have and it doesn’t look like a problem. It might just be time to publish it on Tomcat. Could post the server startup log?
– utluiz
put the log, take a look at please
– wladyband
Unfortunately I couldn’t find the problem through the log. The only thing I found out is that Spring 3 doesn’t work in Java 8. I don’t have an earlier version to test the project now. Already tried to upgrade to Spring 4?
– utluiz
404
is the error ofnot found
.... checks if all the files are actually inpatchs
specified– MarceloBoni