Categories

See More
Popular Forum

MBA (4887) B.Tech (1769) Engineering (1486) Class 12 (1030) Study Abroad (1004) Computer Science and Engineering (988) Business Management Studies (865) BBA (846) Diploma (746) CAT (651) B.Com (648) B.Sc (643) JEE Mains (618) Mechanical Engineering (574) Exam (525) India (462) Career (452) All Time Q&A (439) Mass Communication (427) BCA (417) Science (384) Computers & IT (Non-Engg) (383) Medicine & Health Sciences (381) Hotel Management (373) Civil Engineering (353) MCA (349) Tuteehub Top Questions (348) Distance (340) Colleges in India (334)
See More
( 6 months ago )

Spring MVC maven project giving 404

Course Queries Syllabus Queries
Max. 2000 characters
Replies

usr_profile.png
Jasmin Bhasin

User

( 6 months 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.

<beans 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">

    <!-- Specifying base package of the Components like Controller, Service,
        DAO -->
    <context:component-scan base-package="com.syllabus" />

    <!-- Getting Database properties -->
    <context:property-placeholder location="/resources/db.properties" />

    <mvc:annotation-driven />

    <!-- Specifying the Resource location to load JS, CSS, Images etc -->
    <mvc:resources mapping="/resources/**" location="/resources/" />

    <!-- View Resolver -->
    <bean
        class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/views/" />
        <property name="suffix" value=".jsp" />
    </bean>

    <!-- DataSource -->
    <bean class="org.springframework.jdbc.datasource.DriverManagerDataSource"
        id="dataSource">
        <property name="driverClassName" value="${database.driver}"></property>
        <property name="url" value="${database.url}"></property>
        <property name="username" value="${database.user}"></property>
        <property name="password" value="${database.password}"></property>
    </bean>

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

        <property name="packagesToScan" value="com.syllabus.entity"></property>
    </bean>

    <!-- Transaction -->
    <bean id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>

    <tx:annotation-driven transaction-manager="transactionManager" />
</beans>

what's your interest


forum_ban8_5d8c5fd7cf6f7.gif