org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException

Spring JIRA | Andy Wilkinson | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Startup exception when using Spring Security

    GitHub | 2 years ago | YannCebron
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException
  2. 0

    {noformat} [2014-12-02 11:48:18.415] - 93880 INFORMATION [main] --- org.springframework.context.annotation.AnnotationConfigApplicationContext: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@64bfbc86: startup date [Tue Dec 02 11:48:18 CET 2014]; root of context hierarchy [2014-12-02 11:48:23.159] - 93880 INFORMATION [main] --- org.springframework.core.annotation.AnnotationUtils: Failed to introspect annotations on [interface org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity]: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy [2014-12-02 11:48:23.160] - 93880 WARNUNG [main] --- org.springframework.context.annotation.AnnotationConfigApplicationContext: Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:248) at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:262) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:226) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:163) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) at org.springframework.boot.SpringApplication.run(SpringApplication.java:961) at org.springframework.boot.SpringApplication.run(SpringApplication.java:950) at MySpringApplication.main(MySpringApplication.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: java.lang.NullPointerException at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:75) at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:48) at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1789) at org.springframework.asm.ClassReader.accept(ClassReader.java:642) at org.springframework.asm.ClassReader.accept(ClassReader.java:508) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98) at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:279) ... 22 more {noformat}

    Spring JIRA | 2 years ago | Andy Wilkinson
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException
  3. 0

    {noformat} [2014-12-02 11:48:18.415] - 93880 INFORMATION [main] --- org.springframework.context.annotation.AnnotationConfigApplicationContext: Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@64bfbc86: startup date [Tue Dec 02 11:48:18 CET 2014]; root of context hierarchy [2014-12-02 11:48:23.159] - 93880 INFORMATION [main] --- org.springframework.core.annotation.AnnotationUtils: Failed to introspect annotations on [interface org.springframework.security.config.annotation.web.servlet.configuration.EnableWebMvcSecurity]: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy [2014-12-02 11:48:23.160] - 93880 WARNUNG [main] --- org.springframework.context.annotation.AnnotationConfigApplicationContext: Exception encountered during context initialization - cancelling refresh attempt org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:303) at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:248) at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:262) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:226) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:163) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306) at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254) at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) at org.springframework.boot.SpringApplication.run(SpringApplication.java:961) at org.springframework.boot.SpringApplication.run(SpringApplication.java:950) at MySpringApplication.main(MySpringApplication.java:18) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: java.lang.NullPointerException at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:75) at org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:48) at org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1789) at org.springframework.asm.ClassReader.accept(ClassReader.java:642) at org.springframework.asm.ClassReader.accept(ClassReader.java:508) at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64) at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98) at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:279) ... 22 more {noformat}

    Spring JIRA | 2 years ago | Andy Wilkinson
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [jar:file:/Users/yann/Desktop/_Spring/___boot/spring-boot-autoconfigure-1.2.0.BUILD-20141202.095010-420.jar!/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfiguration$WebMvcSecurityConfigurationConditions$DefaultWebMvcSecurityConfiguration.class]; nested exception is java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd()
    2. Spring Core
      CachingMetadataReaderFactory.getMetadataReader
      1. org.springframework.core.type.classreading.AnnotationAttributesReadingVisitor.doVisitEnd(AnnotationAttributesReadingVisitor.java:75)
      2. org.springframework.core.type.classreading.RecursiveAnnotationAttributesVisitor.visitEnd(RecursiveAnnotationAttributesVisitor.java:48)
      3. org.springframework.asm.ClassReader.readAnnotationValues(ClassReader.java:1789)
      4. org.springframework.asm.ClassReader.accept(ClassReader.java:642)
      5. org.springframework.asm.ClassReader.accept(ClassReader.java:508)
      6. org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:64)
      7. org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:98)
      8. org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
      8 frames
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:279)
      2. org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:248)
      3. org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:140)
      4. org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:262)
      5. org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:226)
      6. org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193)
      7. org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:163)
      8. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306)
      9. org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239)
      10. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
      11. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
      12. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606)
      13. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462)
      13 frames
    4. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
      2. org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
      3. org.springframework.boot.SpringApplication.run(SpringApplication.java:961)
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:950)
      4 frames
    5. Unknown
      MySpringApplication.main
      1. MySpringApplication.main(MySpringApplication.java:18)
      1 frame
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:483)
      4 frames
    7. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      1 frame