org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration

SpringSource Issue Tracker | Leo Dos Santos (c) | 3 years ago
  1. 0

    Kris and I both see this error when running the Batch Processing getting started guide. The error is only reproducible once per session, you must delete the project and restart to reproduce again. Best I can tell, the @EnableAutoConfiguration annotation for this project causes the org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration class to be processed. This class contains an annotation @EnableWebMvc which also causes org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration to be processed. Spring IDE's metadata reader tries to load the class, but it's not on the project's classpath and fails. Error Tue Sep 03 14:46:35 PDT 2013 Problems occurred when invoking code from plug-in: "org.springframework.ide.eclipse.beans.core". org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:417) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:159) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:317) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:310) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:308) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:223) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:680) Caused by: java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:433) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:244) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:312) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:216) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:459) at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:414) ... 17 more

    SpringSource Issue Tracker | 3 years ago | Leo Dos Santos (c)
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration
  2. 0

    Kris and I both see this error when running the Batch Processing getting started guide. The error is only reproducible once per session, you must delete the project and restart to reproduce again. Best I can tell, the @EnableAutoConfiguration annotation for this project causes the org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration class to be processed. This class contains an annotation @EnableWebMvc which also causes org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration to be processed. Spring IDE's metadata reader tries to load the class, but it's not on the project's classpath and fails. Error Tue Sep 03 14:46:35 PDT 2013 Problems occurred when invoking code from plug-in: "org.springframework.ide.eclipse.beans.core". org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:417) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:159) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:317) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:310) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:308) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:223) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:680) Caused by: java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:433) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:244) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:312) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:216) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:459) at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:414) ... 17 more

    SpringSource Issue Tracker | 3 years ago | Leo Dos Santos (c)
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: ; nested exception is java.io.IOException: Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration
  3. 0

    A spin off from issue https://jira.spring.io/browse/IDE-1375 {code} org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.springframework.cloud.netflix.eureka.server.ApplicationTests$Application]; nested exception is java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:177) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:328) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:321) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:319) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:233) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) Caused by: java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:591) at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getRelated(ConfigurationClassParser.java:806) at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getAnnotationAttributes(ConfigurationClassParser.java:787) at org.springframework.context.annotation.ConfigurationClassParser.collectImports(ConfigurationClassParser.java:414) at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:389) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:272) 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) ... 14 more {code}

    SpringSource Issue Tracker | 1 year ago | Andy Clement
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.springframework.cloud.netflix.eureka.server.ApplicationTests$Application]; nested exception is java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    A spin off from issue https://jira.spring.io/browse/IDE-1375 {code} org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.springframework.cloud.netflix.eureka.server.ApplicationTests$Application]; nested exception is java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:177) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:306) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:328) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:321) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:319) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:233) at org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:744) Caused by: java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:591) at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getRelated(ConfigurationClassParser.java:806) at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getAnnotationAttributes(ConfigurationClassParser.java:787) at org.springframework.context.annotation.ConfigurationClassParser.collectImports(ConfigurationClassParser.java:414) at org.springframework.context.annotation.ConfigurationClassParser.getImports(ConfigurationClassParser.java:389) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:272) 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) ... 14 more {code}

    SpringSource Issue Tracker | 1 year ago | Andy Clement
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [org.springframework.cloud.netflix.eureka.server.ApplicationTests$Application]; nested exception is java.io.IOException: Could not find org.springframework.boot.autoconfigure$EnableAutoConfigurationImportSelector
  6. 0

    Got this exception when trying to add a config file from a jar on the maven classpath: {code} org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: org.springframework.batch.admin.web.resources.MenuManager; nested exception is java.io.IOException: Could not find org.springframework.batch.admin.web.resources.MenuManager$1 at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:156) at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284) at org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:86) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$4.run(BeansConfig.java:749) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.executePostProcessor(BeansConfig.java:742) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.postProcess(BeansConfig.java:626) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig.access$8(BeansConfig.java:585) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:451) at org.springframework.ide.eclipse.beans.core.internal.model.BeansConfig$3.call(BeansConfig.java:1) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Caused by: java.io.IOException: Could not find org.springframework.batch.admin.web.resources.MenuManager$1 at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50) at org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38) at org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:309) at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:216) at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:170) at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:152) ... 17 more {code} Let me know if you need more details.

    SpringSource Issue Tracker | 3 years ago | Andrew Eisenberg (c)
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: org.springframework.batch.admin.web.resources.MenuManager; nested exception is java.io.IOException: Could not find org.springframework.batch.admin.web.resources.MenuManager$1

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      Could not find org.springframework.web.servlet.config.annotation$DelegatingWebMvcConfiguration

      at org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader()
    2. org.springframework.ide
      CachingJdtMetadataReaderFactory.getMetadataReader
      1. org.springframework.ide.eclipse.core.java.classreading.JdtMetadataReaderFactory.getMetadataReader(JdtMetadataReaderFactory.java:50)
      2. org.springframework.ide.eclipse.core.java.classreading.CachingJdtMetadataReaderFactory.getMetadataReader(CachingJdtMetadataReaderFactory.java:38)
      2 frames
    3. Spring Context
      ConfigurationClassPostProcessor.processConfigBeanDefinitions
      1. org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:433)
      2. org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:244)
      3. org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202)
      4. org.springframework.context.annotation.ConfigurationClassParser.processMemberClasses(ConfigurationClassParser.java:312)
      5. org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:216)
      6. org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:202)
      7. org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:459)
      8. org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:414)
      9. org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:159)
      10. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284)
      10 frames
    4. org.springframework.ide
      BeansJavaConfig$3.run
      1. org.springframework.ide.eclipse.metadata.process.JdtConfigurationClassPostProcessor.postProcess(JdtConfigurationClassPostProcessor.java:88)
      2. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$3.run(BeansJavaConfig.java:317)
      2 frames
    5. Eclipse Core
      SafeRunner.run
      1. org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
      1 frame
    6. org.springframework.ide
      BeansJavaConfig$2.call
      1. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.executePostProcessor(BeansJavaConfig.java:310)
      2. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig.access$5(BeansJavaConfig.java:308)
      3. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:223)
      4. org.springframework.ide.eclipse.beans.core.internal.model.BeansJavaConfig$2.call(BeansJavaConfig.java:1)
      4 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      3. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      4. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      5. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      6. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      7. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      8. java.lang.Thread.run(Thread.java:680)
      8 frames