0

Spring MVC 5 (not spring boot) with Hibernate 5 deploying successfully (without any errors) on Tomcat 8.5 OpenJdk11, but on accessing the path I am getting

404 - WARN org.springframework.web.servlet.PageNotFound - No mapping for

Previously when I was on spring 4 and Hibernate 4, the following lines used to show up on the tomcat console during deployment:

[localhost-startStop-1] INFO org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcherServlet': initialization started
[localhost-startStop-1] INFO org.springframework.web.context.support.XmlWebApplicationContext - Refreshing WebApplicationContext for namespace 'dispatcherServlet-servlet': startup date []; root of context hierarchy
[localhost-startStop-1] INFO org.springframework.beans.factory.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource

[localhost-startStop-1] INFO org.springframework.jdbc.datasource.DriverManagerDataSource - Loaded JDBC driver: oracle.jdbc.driver.OracleDriver
 INFO [localhost-startStop-1] org.hibernate.annotations.common.Version.<clinit> HCANN000001: Hibernate Commons Annotations {4.0.1.Final}

[localhost-startStop-1] INFO org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping - Mapped URL path [/xxxx/xxxx] onto handler 'xxxx'

after updating the dependencies, both spring 5 and hibernate 5, no such lines are visible. I couldn't understand if my Spring container is started or not.

Please help me out in understanding what I am missing.

Laurenz Albe
  • 209,280
  • 17
  • 206
  • 263
  • can you please share your web.xml and other spring config xmls? – It Grunt May 20 '21 at 17:45
  • @ItGrunt Url pattern in web.xml for spring dispatcher servlet goes like *.do, just now I find updating that to / controller is able to get mapped with request call. The question is why on earth *.do worked with spring 4 and why not with spring 5. Is there any why to achieve this, if not I would need to change all my controller calls from jsp/js files. – Bhargav Tummala May 21 '21 at 09:58
  • If you're now using tomcat I'm not so sure that's the way you want to deploy and run your code... Tomcat typically deploys .war/.jar files that contain your static resources and your web app... can you please share your config files so we have a better idea of what's going on? – It Grunt May 21 '21 at 11:59

0 Answers0