title: java.lang.NoClassDefFoundError: org.springframework.beans.FatalBeanException when initializing context
body: <p>I'm getting an exception when starting my project with the <code>mvn exec:java</code> command</p>
  
  <p><strong>Trace:</strong></p>
  
  <pre><code>2015-08-11 16:57:58 INFO  DatabaseBeansConfig:60 - Creating bean connectionFactory
  Exception in thread "main" java.lang.NoClassDefFoundError: org.springframework.beans.FatalBeanException
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:798)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:530)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:771)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:342)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:735)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:259)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
      at org.eclipse.jetty.server.Server.start(Server.java:405)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
      at org.eclipse.jetty.server.Server.doStart(Server.java:372)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at com.phistory.app.jetty.JettyInitializer.startJetty(JettyInitializer.java:41)
      at com.phistory.app.Main.main(Main.java:13)
  2015-08-11 16:57:58 ERROR ContextLoader:358 - Context initialization failed
  java.lang.NoClassDefFoundError: org.springframework.beans.FatalBeanException
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:798)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:530)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:771)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:342)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:735)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:259)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132)
      at org.eclipse.jetty.server.Server.start(Server.java:405)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:106)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
      at org.eclipse.jetty.server.Server.doStart(Server.java:372)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at com.phistory.app.jetty.JettyInitializer.startJetty(JettyInitializer.java:41)
      at com.phistory.app.Main.main(Main.java:13)
  </code></pre>
  
  <p><strong>- Jars in my classpath:</strong></p>
  
  <pre><code>    mvn dependency:tree
      [INFO] Scanning for projects...
      [INFO]
      [INFO]      ------------------------------------------------------------------------
      [INFO] Building XXXXXX 1.0.61
      [INFO]  ------------------------------------------------------------------------
      [INFO]
      [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ XXXXXX -
      --
      [INFO] XXXXXX:war:1.0.61
      [INFO] +- javax:javaee-web-api:jar:7.0:provided
      [INFO] +- javax:javaee-web-api:jar:javadoc:7.0:compile
      [INFO] +- com.the-carpedia:the-carpedia-data:jar:1.2.11:compile
      [INFO] |  +- javax.servlet:javax.servlet-api:jar:javadoc:3.1.0:compile
      [INFO] |  +- org.hibernate:hibernate-entitymanager:jar:4.3.10.Final:compile
      [INFO] |  |  +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
      [INFO] |  |  +- org.hibernate:hibernate-core:jar:4.3.10.Final:compile
      [INFO] |  |  |  +- antlr:antlr:jar:2.7.7:compile
      [INFO] |  |  |  \- org.jboss:jandex:jar:1.1.0.Final:compile
      [INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
      [INFO] |  |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile
      [INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.5.Final:compile
      [INFO] |  |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
      [INFO] |  |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec: jar:1.0.0.Final:compile
      [INFO] |  |  \- org.javassist:javassist:jar:3.18.1-GA:compile
      [INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:javadoc:1.0.0.Final:compile
      [INFO] |  +- org.hibernate:hibernate-search-orm:jar:5.3.0.Final:compile
      [INFO] |  |  \- org.hibernate:hibernate-search-engine:jar:5.3.0.Final:compile
      [INFO] |  |     +- org.apache.lucene:lucene-core:jar:4.10.4:compile
      [INFO] |  |     +- org.apache.lucene:lucene-analyzers-common:jar:4.10.4:compile
      [INFO] |  |     \- org.apache.lucene:lucene-facet:jar:4.10.4:compile
      [INFO] |  |        \- org.apache.lucene:lucene-queries:jar:4.10.4:compile
      [INFO] |  +- org.hibernate:hibernate-search-orm:jar:javadoc:5.3.0.Final:compile
      [INFO] |  +- org.hibernate:hibernate-validator:jar:5.2.1.Final:compile
      [INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
      [INFO] |  |  \- com.fasterxml:classmate:jar:1.1.0:compile
      [INFO] |  +- org.apache.lucene:lucene-core:jar:javadoc:5.2.1:compile
      [INFO] |  +- org.springframework:spring-web:jar:4.2.0.RELEASE:compile
      [INFO] |  |  \- org.springframework:spring-aop:jar:4.2.0.RELEASE:compile
      [INFO] |  |     \- aopalliance:aopalliance:jar:1.0:compile
      [INFO] |  +- org.springframework:spring-web:jar:javadoc:4.2.0.RELEASE:compile
      [INFO] |  +- org.springframework:spring-orm:jar:4.2.0.RELEASE:compile
      [INFO] |  |  +- org.springframework:spring-jdbc:jar:4.2.0.RELEASE:compile
      [INFO] |  |  \- org.springframework:spring-tx:jar:4.2.0.RELEASE:compile
      [INFO] |  +- org.springframework:spring-orm:jar:javadoc:4.2.0.RELEASE:compile
      [INFO] |  +- org.springframework:spring-context:jar:javadoc:4.2.0.RELEASE:compile
      [INFO] |  +- org.apache.commons:commons-dbcp2:jar:2.1:compile
      [INFO] |  |  +- org.apache.commons:commons-pool2:jar:2.3:compile
      [INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
      [INFO] |  +- org.apache.commons:commons-dbcp2:jar:javadoc:2.1:compile
      [INFO] |  +- org.slf4j:slf4j-api:jar:1.7.10:compile
      [INFO] |  +- org.slf4j:slf4j-api:jar:javadoc:1.7.10:compile
      [INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:compile
      [INFO] |  \- com.fasterxml.jackson.core:jackson-annotations:jar:javadoc:2.6.0:compile
      [INFO] +- org.springframework:spring-webmvc:jar:4.2.0.RELEASE:compile
      [INFO] |  +- org.springframework:spring-context:jar:4.2.0.RELEASE:compile
      [INFO] |  +- org.springframework:spring-core:jar:4.2.0.RELEASE:compile
      [INFO] |  \- org.springframework:spring-expression:jar:4.2.0.RELEASE:compile
      [INFO] +- org.springframework:spring-webmvc:jar:javadoc:4.2.0.RELEASE:compile
      [INFO] +- org.springframework:spring-context-support:jar:4.2.0.RELEASE:runtime
      [INFO] +- org.springframework:spring-beans:jar:4.2.0.RELEASE:runtime
      [INFO] +- org.freemarker:freemarker:jar:2.3.23:compile
      [INFO] +- org.freemarker:freemarker:jar:javadoc:2.3.23:compile
      [INFO] +- commons-collections:commons-collections:jar:3.2.1:runtime
      [INFO] +- mysql:mysql-connector-java:jar:5.1.36:runtime
      [INFO] +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:provided
      [INFO] +- org.eclipse.jetty:jetty-webapp:jar:9.3.2.v20150730:compile
      [INFO] |  +- org.eclipse.jetty:jetty-xml:jar:9.3.2.v20150730:compile
      [INFO] |  |  \- org.eclipse.jetty:jetty-util:jar:9.3.2.v20150730:compile
      [INFO] |  \- org.eclipse.jetty:jetty-servlet:jar:9.3.2.v20150730:compile
      [INFO] +- org.eclipse.jetty:jetty-webapp:jar:javadoc:9.3.2.v20150730:compile
      [INFO] +- org.eclipse.jetty:jetty-servlet:jar:javadoc:9.3.2.v20150730:compile
      [INFO] |  \- org.eclipse.jetty:jetty-security:jar:9.3.2.v20150730:compile
      [INFO] |     \- org.eclipse.jetty:jetty-server:jar:9.3.2.v20150730:compile
      [INFO] +- org.eclipse.jetty:jetty-server:jar:javadoc:9.3.2.v20150730:compile
      [INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
      [INFO] |  +- org.eclipse.jetty:jetty-http:jar:9.3.2.v20150730:compile
      [INFO] |  \- org.eclipse.jetty:jetty-io:jar:9.3.2.v20150730:compile
      [INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.12:compile
      [INFO] |  \- log4j:log4j:jar:1.2.17:compile
      [INFO] \- org.slf4j:slf4j-log4j12:jar:javadoc:1.7.12:compile
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESS
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.317 s
      [INFO] Finished at: 2015-08-11T17:01:19+02:00
      [INFO] Final Memory: 17M/222M
      [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p><strong>Pom.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
  
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;groupId&gt;XXXX&lt;/groupId&gt;
  &lt;artifactId&gt;XXXXX&lt;/artifactId&gt;
  &lt;version&gt;1.0.61&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;name&gt;XXXX&lt;/name&gt;   
  &lt;inceptionYear&gt;2014&lt;/inceptionYear&gt; 
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
  
      &lt;java.source.version&gt;1.8&lt;/java.source.version&gt;
      &lt;maven.compiler.plugin.version&gt;3.1&lt;/maven.compiler.plugin.version&gt;
      &lt;maven.war.plugin.version&gt;2.3&lt;/maven.war.plugin.version&gt;
      &lt;maven.clean.plugin.version&gt;2.5&lt;/maven.clean.plugin.version&gt;        
  
      &lt;javax.ee.version&gt;7.0&lt;/javax.ee.version&gt;
      &lt;com.thecarpedia.data.version&gt;1.2.11&lt;/com.thecarpedia.data.version&gt;
      &lt;org.springframework.version&gt;4.2.0.RELEASE&lt;/org.springframework.version&gt;
      &lt;org.freemarker.version&gt;2.3.23&lt;/org.freemarker.version&gt;     
      &lt;org.eclipse.jetty.version&gt;9.3.2.v20150730&lt;/org.eclipse.jetty.version&gt;
      &lt;org.slf4j-log4j12.version&gt;1.7.12&lt;/org.slf4j-log4j12.version&gt;
      &lt;commons.collection.version&gt;3.2.1&lt;/commons.collection.version&gt;
      &lt;mysql.connector.version&gt;5.1.36&lt;/mysql.connector.version&gt;   
      &lt;jboss-logging.version&gt;3.3.0.Final&lt;/jboss-logging.version&gt;  
  &lt;/properties&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.compiler.plugin.version}&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
              &lt;configuration&gt;
                  &lt;source&gt;${java.source.version}&lt;/source&gt;
                  &lt;target&gt;${java.source.version}&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.war.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                  &lt;outputDirectory&gt;deployments&lt;/outputDirectory&gt;
                  &lt;packagingExcludes&gt;WEB-INF/lib/*-javadoc.jar&lt;/packagingExcludes&gt;
                  &lt;warName&gt;ROOT&lt;/warName&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
              &lt;version&gt;${maven.clean.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;filesets&gt;
                      &lt;fileset&gt;
                          &lt;directory&gt;deployments&lt;/directory&gt;
                          &lt;includes&gt;
                              &lt;include&gt;**/*.war&lt;/include&gt;
                              &lt;followSymlinks&gt;false&lt;/followSymlinks&gt;
                          &lt;/includes&gt;
                      &lt;/fileset&gt;
                  &lt;/filesets&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;${javax.ee.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
          &lt;version&gt;${javax.ee.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.the-carpedia&lt;/groupId&gt;
          &lt;artifactId&gt;the-carpedia-data&lt;/artifactId&gt;
          &lt;version&gt;${com.thecarpedia.data.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;exclusions&gt;
              &lt;exclusion&gt;
                  &lt;groupId&gt;org.springframework&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
              &lt;/exclusion&gt;
          &lt;/exclusions&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-context-support&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-beans&lt;/artifactId&gt;
          &lt;version&gt;${org.springframework.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;org.freemarker&lt;/groupId&gt;
          &lt;artifactId&gt;freemarker&lt;/artifactId&gt;
          &lt;version&gt;${org.freemarker.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.freemarker&lt;/groupId&gt;
          &lt;artifactId&gt;freemarker&lt;/artifactId&gt;
          &lt;version&gt;${org.freemarker.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;commons-collections&lt;/groupId&gt;
          &lt;artifactId&gt;commons-collections&lt;/artifactId&gt;
          &lt;version&gt;${commons.collection.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;mysql&lt;/groupId&gt;
          &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;
          &lt;version&gt;${mysql.connector.version}&lt;/version&gt;
          &lt;scope&gt;runtime&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.logging&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-logging&lt;/artifactId&gt;
          &lt;version&gt;${jboss-logging.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;jetty-webapp&lt;/artifactId&gt;
          &lt;version&gt;${org.eclipse.jetty.version}&lt;/version&gt;
      &lt;/dependency&gt;       
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;jetty-webapp&lt;/artifactId&gt;
          &lt;version&gt;${org.eclipse.jetty.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;jetty-servlet&lt;/artifactId&gt;
          &lt;version&gt;${org.eclipse.jetty.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.jetty&lt;/groupId&gt;
          &lt;artifactId&gt;jetty-server&lt;/artifactId&gt;
          &lt;version&gt;${org.eclipse.jetty.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;${org.slf4j-log4j12.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
          &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
          &lt;version&gt;${org.slf4j-log4j12.version}&lt;/version&gt;
          &lt;classifier&gt;javadoc&lt;/classifier&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  </code></pre>
  
  <p></p>
  
  <p>As you can see I have the <code>org.springframework:spring-beans:jar:4.2.0.RELEASE</code> jar in my classpath. This project had been working fine until recently, but I don't know what changes I must have made introduced this error.</p>
  
  <p>I have tried running it on Jetty and Wildfly 8.2, with the same output.</p>
  
  <p><strong>PROBLEM SOLVED</strong>
  I've detected I had an issue with my Database beans @Configuration, I had a circular reference like so:</p>
  
  <pre><code>    2015-08-15 18:50:07 INFO  DatabaseBeansConfig:60 - Creating bean connectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:74 - Creating bean poolableConnectionFactory
  2015-08-15 18:50:07 INFO  DatabaseBeansConfig:88 - Creating bean objectPool
  </code></pre>
  
  <p>This was happening until it threw the <code>NoClassDefFoundError</code> exception. </p>