Spring:mvc 4.0 nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found -
<jul 22, 2015 7:00:00 pm ist> <error> <http> <bea-101216> <servlet: "dispatcher" failed preload on startup in web application: "test".
org.springframework.beans.factory.xml.xmlbeandefinitionstoreexception: line 31 in xml document servletcontext resource [/web-inf/classes/dispatcher-servlet.xml] invalid; nested exception org.xml.sax.saxparseexception: cvc-complex-type.2.4.a: invalid content found starting element 'bean'. 1 of '{"http://www.springframework.org/schema/mvc":mapping}' expected.
i receiving above exception while starting application, please find spring configurations below.
xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemalocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd"> <mvc:interceptors> <mvc:interceptor> <bean name="cachingheadersinterceptor" class="com.testcompany.test.interceptors.cacheinterceptor"/> </mvc:interceptor> </mvc:interceptors>
where app working fine when have replaced interceptors below
<mvc:interceptors> <bean name="cachingheadersinterceptor" class="com.testcompany.test.interceptors.cacheinterceptor"/> </mvc:interceptors>
help me correcting configuration.
Comments
Post a Comment