title: BeanDefinitionStoreException Failed to read candidate component class
body: <p>Can someone tell me how to solve this issue?</p>
  
  <p>I have narrowed down the problem to the pom.xml file. My project works but when I add the following dependency I get an error</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-jpa&lt;/artifactId&gt;
          &lt;version&gt;1.3.2.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>The error stack is as follow </p>
  
  <pre><code>ERROR DispatcherServlet - Context initialization failed
  org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [C:\workspace-sts\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\Webtest1\WEB-INF\classes\com\springweb\controller\SetHomePageController.class]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class
      at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1438) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1428) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:185) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:139) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:108) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180) ~[spring-beans-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125) ~[spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94) ~[spring-web-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:451) ~[spring-context-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) ~[spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.3.RELEASE.jar:3.2.3.RELEASE]
      at javax.servlet.GenericServlet.init(GenericServlet.java:160) [servlet-api.jar:3.0.FR]
      at org.apache.catalina.core.Standar
  </code></pre>
  
  <p>I can't understand what is wrong with the dependency, I need spring-data jpa dependency later when I'm going to add a dao that uses extends JpaRepository.</p>
  
  <p>Thanks in advance.</p>