Spring bean load error using spring-data-mongodb <p>We are using Spring version 3.2.0 and now introducing spring-data-mongodb version 1.4.0 in the codebase. I tried to write a new spring config file (mongo-config.xml) while solely defines mongodb related beans. </p> <p>My Spring config is as follows: </p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xmlns:mongo="http://www.springframework.org/schema/data/mongo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.4.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt; &lt;mongo:mongoid="replicaSetMongo"replica-set="localhost:10901,localhost:10902"&gt; &lt;mongo:optionsconnections-per-host="8" ssl="false" /&gt; &lt;/mongo:mongo&gt; &lt;mongo:db-factoryid="xmlLogDbFactory" mongo-ref="replicaSetMongo" dbname="logs" username="logs_owner" password="logs_owner" /&gt; &lt;mongo:mapping-converter&gt; &lt;mongo:custom-converters&gt; &lt;mongo:converter&gt; &lt;beanclass="com.utils.mongodb.dao.impl.SspLogsWriteConver ter"/&gt; &lt;/mongo:converter&gt; &lt;/mongo:custom-converters&gt; &lt;/mongo:mapping-converter&gt; &lt;beanid="xmlLogTemplate"class="org.springframework.data.mongodb.core.MongoTempla te"&gt; &lt;constructor-argname="mongoDbFactory"ref="xmlLogDbFactory"/&gt; &lt;constructor-argname="mongoConverter"ref="mappingConverter"/&gt; &lt;propertyname="writeConcern"&gt; &lt;util:constantstatic-field="com.mongodb.WriteConcern.UNACKNOWLEDGED"/&gt; &lt;/property&gt; &lt;/bean&gt; &lt;/beans&gt; </code></pre> <p>I deployed the application on JBoss. But JBoss given errors on startup as follows. Can someone help me what is going wrong? Is there a mismatch between spring version &amp; spring-mongodb version? I noticed that the exception trace mentions spring-beans-3.2.0 jar even though the issue is with mongo-config.xml</p> <pre><code>Caused by: org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: Failed to import bean definitions from relative location [mongo-config.xml] Offending resource: class path resource [spring/commonUtil-config.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Unexpected exception parsing XML document from class path resource [spring/mongo-config.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [org.springframework.data.mongodb.config.MongoNames paceHandler] for namespace [http://www.springframework.org/schema/data/mongo]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/data/repository/config/RepositoryConfigurationExtension at org.springframework.beans.factory.parsing.FailFast ProblemReporter.error(FailFastProblemReporter.java :68) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:85) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.parsing.ReaderCo ntext.error(ReaderContext.java:76) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.importBeanDefinitionResour ce(DefaultBeanDefinitionDocumentReader.java:271) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseDefaultElement(Defaul tBeanDefinitionDocumentReader.java:196) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.parseBeanDefinitions(Defau ltBeanDefinitionDocumentReader.java:181) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.doRegisterBeanDefinitions( DefaultBeanDefinitionDocumentReader.java:140) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.registerBeanDefinitions(De faultBeanDefinitionDocumentReader.java:111) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.registerBeanDefinitions(XmlBeanDefinit ionReader.java:493) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.doLoadBeanDefinitions(XmlBeanDefinitio nReader.java:390) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:334) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.XmlBeanDefin itionReader.loadBeanDefinitions(XmlBeanDefinitionR eader.java:302) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] at org.springframework.beans.factory.xml.DefaultBeanD efinitionDocumentReader.importBeanDefinitionResour ce(DefaultBeanDefinitionDocumentReader.java:255) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE] ... 36 more </code></pre>