BeanDefinitionStoreException Failed to read candidate component class
Another reason is use of Spring 3 with Java 8. Java 8 requires Spring 4.
(not specific to this question, but for those who are googling the error message)
You most likely have conflicting Spring dependencies on your classpath. It's probably an old spring-asm
JAR.
Run mvn dependency:tree -Dincludes=:spring*::
and check for conflicts. The best way to avoid these is to put a dependency on the spring-framework-bom
in your project's dependencyManagement
section, as follows
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>4.0.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
These versions are supported.