I am getting javax.servlet.ServletException: Servlet.init() for servlet mvc-dispatcher threw exception and there are two root causes for this exception which are :
1: org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 11 in XML document from ServletContext resource [/WEB-INF/mvc-dispatcher-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
2: org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans'.
Please guys get me help as soon as possible.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://ift.tt/GArMu6"
xmlns:xsi="http://ift.tt/ra1lAU"
xmlns:context="http://ift.tt/GArMu7"
xmlns:mongo="http://ift.tt/13feL6M"
xsi:schemaLocation="http://ift.tt/GArMu6
http://ift.tt/1tN1Ox5
http://ift.tt/GArMu7
http://ift.tt/WNwMXb
http://ift.tt/13feL6M
http://ift.tt/1iMF6wH">
<!-- <context:component-scan base-package="com.mongodb.config" /> -->
<mongo:mongo host="127.0.0.1" port="27017" />
<mongo:db-factory dbname="yourdb" />
<bean id="mongoTemplate" class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg name="mongoDbFactory" ref="mongoDbFactory" />
</bean>
</beans>`enter code here`
No comments:
Post a Comment