Spring MVC maven project giving 404

Course Queries Syllabus Queries 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Syllabus Queries related to Course Queries. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 


Hi In my spring mvc webapp,request is not reaching toward controller,showing 404.Here is my tomcat log. Not Being able to understand what exactly the issue is, as there are no compile time errors.I have gone through several other posts where the possible problem was java versioning issue,but I have checked that as well, my java version is 1.7 in pom.xml and in java compiler.I have done maven clean and build,still issue persists.

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:syllabusNew' did not find a matching property. Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version: Apache Tomcat/8.0.28 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Oct 7 2015 18:25:21 UTC Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Server number: 8.0.28.0 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Windows 7 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version: 6.1 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: x86 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: C:\Program Files\Java\jdk1.7.0_02\jre Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: 1.7.0_02-b13 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor: Oracle Corporation Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE: D:\Syllabus Magt.metadata.plugins\org.eclipse.wst.server.core\tmp0 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.0 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.base=D:\Syllabus Magt.metadata.plugins\org.eclipse.wst.server.core\tmp0 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0 Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dwtp.deploy=D:\Syllabus Magt.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed Mar 13, 2018 8:44:34 AM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dfile.encoding=Cp1252 Mar 13, 2018 8:44:34 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_02\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_162/bin/client;C:/Program Files/Java/jre1.8.0_162/bin;C:/Program Files/Java/jre1.8.0_162/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files\Java\jdk1.7.0_02\bin;C:\eclipse-jee-mars-2-win32\eclipse;;. Mar 13, 2018 8:44:35 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-8080"] Mar 13, 2018 8:44:35 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Mar 13, 2018 8:44:35 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8009"] Mar 13, 2018 8:44:35 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFO: Using a shared selector for servlet write/read Mar 13, 2018 8:44:35 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1112 ms Mar 13, 2018 8:44:35 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Catalina Mar 13, 2018 8:44:35 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/8.0.28 Mar 13, 2018 8:44:41 AM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Mar 13, 2018 8:44:41 AM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Mar 13, 2018 8:44:41 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-nio-8080"] Mar 13, 2018 8:44:41 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-nio-8009"] Mar 13, 2018 8:44:41 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 6044 ms

Here is dispatcher servlet.

 xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
       http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

    
     base-package="com.syllabus" />

    
     location="/resources/db.properties" />

     />

    
     mapping="/resources/**" location="/resources/" />

    
    
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
         name="prefix" value="/WEB-INF/views/" />
         name="suffix" value=".jsp" />
    

    
     class="org.springframework.jdbc.datasource.DriverManagerDataSource"
        id="dataSource">
         name="driverClassName" value="${database.driver}">
         name="url" value="${database.url}">
         name="username" value="${database.user}">
         name="password" value="${database.password}">
    

    
     id="sessionFactory"
        class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
         name="dataSource" ref="dataSource">
         name="hibernateProperties">
            
                 key="hibernate.dialect">${hibernate.dialect}
                 key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}
                 key="hibernate.format_sql">${hibernate.format_sql}
                 key="hibernate.show_sql">${hibernate.show_sql}
            
        
         name="configLocation" value="classpath:hibernate-cfg.xml" />

         name="packagesToScan" value="com.syllabus.entity">
    

    
     id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager">
         name="sessionFactory" ref="sessionFactory" />
    

     transaction-manager="transactionManager" />

0 views
0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.