org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [pl.mypackage.Main]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.

Stack Overflow | Defozo | 8 months ago
tip
Do you find the tips below useful? Click on the to mark them and say thanks to rafael . Or join the community to write better ones.
  1. 0

    SpringBoot - making jar files - No auto configuration classes found in META-INF/spring.factories

    Stack Overflow | 8 months ago | Defozo
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [pl.mypackage.Main]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
  2. 0

    Failed to process import candidates for configuration class

    Stack Overflow | 6 months ago | bachr
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [el.dorado.App]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
  3. 0

    GitHub comment 134#251149340

    GitHub | 6 months ago | CraigShields
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [ninja.eivind.hotsreplayuploader.Client]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Check if you didn't add JPA as a dependency, because it requires you to add a minimal code, otherwhise it'll throw the exception. If you're actually using JPA, check this link for more info https://goo.gl/MDAAc0
  6. 0

    "No auto configuration classes found in META-INF/spring.factories" Trying to build Spring standalone

    Stack Overflow | 1 month ago | displayname
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.ema.server.Server]; nested exception is java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.
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.lang.IllegalArgumentException

    No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct.

    at org.springframework.util.Assert.notEmpty()
  2. Spring Core
    Assert.notEmpty
    1. org.springframework.util.Assert.notEmpty(Assert.java:276)
    1 frame
  3. Spring Boot AutoConfigure
    EnableAutoConfigurationImportSelector.selectImports
    1. org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.getCandidateConfigurations(EnableAutoConfigurationImportSelector.java:145)
    2. org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(EnableAutoConfigurationImportSelector.java:84)
    2 frames
  4. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors(ConfigurationClassParser.java:481)
    2. org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:191)
    3. org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:321)
    4. org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
    5. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:273)
    6. org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:98)
    7. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:681)
    8. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:523)
    8 frames
  5. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
    3. org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:369)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
    6. org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
    6 frames
  6. pl.mypackage
    Main.main
    1. pl.mypackage.Main.main(Main.java:39)
    1 frame