title: Spring Bean Not Found
body: <p>I have this project hierarchy:</p>
  
  <p>A SpringConfiguration.java file with one Bean (SoapServiceBean).
  A LoggerUtilsConfiguration.java with two beans (ConfigManager and LoggerManager).</p>
  
  <p>SpringConfiguration imports LoggerUtilsConfigueration with an @Import.</p>
  
  <p>The code:</p>
  
  <pre><code>@Configuration
  @Import({com.myApp.LoggerUtilsConfiguration.class})
  public class SpringConfiguration {
  
      @Lazy
      @Bean(name = "soapServiceBean")
      @Scope(BeanDefinition.SCOPE_PROTOTYPE)
      public SoapServiceBean soapServiceBeanInit(
              @Qualifier("configManager") ConfigManager  configManager ,
              @Qualifier("loggerManager") LoggerManager loggerManager) 
              throws ServiceException, SystemException {
  
          SoapServiceBean service = new SoapServiceBean();
          service.setConfigManager(configManager);
          service.setLoggerManager(loggerManager);
  
          return service; 
      }
  
  }
  
  @Configuration
  public class LoggerUtilsConfiguration {
  
      @Bean(name = "configManager")
      @Scope(BeanDefinition.SINGLETON)
      public ConfigManager configManagerInit() {
  
          ConfigManager cManager = new ConfigManager();
  
          return cManager; 
      }
  
      @Bean(name = "loggerManager")
      @Scope(BeanDefinition.SINGLETON)
      public LoggerManager loggerManagerInit() {
  
          LoggerManager cManager = new LoggerManager();
  
          return cManager; 
      }
  
  }
  </code></pre>
  
  <p>My problema is that, "configManager" is a valid bean, but loggerManager throws this Exception:</p>
  
  <pre><code>No qualifying bean of type [com.myApp.LoggerManager] found for dependency: 
      expected at least 1 bean which qualifies as autowire candidate for this dependency. 
      Dependency annotations: {@org.springframework.beans.factory.annotation.Qualifier(value=loggerManager)} 
  </code></pre>
  
  <p>Is very Strange, because If I copy the loggerManager Bean method into the main @Configuration class, the app starts with no problem and loggerManager is started with no problem.</p>
  
  <p>"LoggerUtilsConfiguration" is not part of my App, is a Maven dependency external jar from another dev team. I have decompiled it and I cannot see anything strange, "configManager" and "loggerManager" has the same annotations with the same values except the bean name.</p>
  
  <p>Any idea?</p>