Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8675923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:04:07+00:00 2026-06-12T20:04:07+00:00

Application-Context is correctly setup! Heres my class scenario public interface IManager { public void

  • 0

Application-Context is correctly setup!

Heres my class scenario

public interface IManager
{
 public void doStuff();
}

@Component
public abstract class ManagerAction implements IManager
{
  @Async
  @Override
  public void doStuff()
  {
     //doing stuff
  }

  public abstract manageWorker();
}

@Component
public class Working extends ManagerAction
{
  @Override
  public manageWorker()
  {
    //some busy code
  }
}

@Component
public class NotWorking extends ManagerAction
{
  @Override
  public manageWorker()
  {
    //some busy code
  }
}

@Service
public class BusinessWorker
{
  @Autowire
  private IManager manager_;

  public void preformTasks()
  {    
    manager_.doStuff();
  }
}

Heres my error

ERROR [main] (ContextLoader.java:307) - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BusinessWorker': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.B
eanCreationException: Could not autowire field: private com.background.IManager com.background.BusinessWorker.manager_; nested exception is org.springframework.beans.
factory.NoSuchBeanDefinitionException: No matching bean of type [com.background.IManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for
 this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}


Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.background.IManager com.background.BusinessWorker.manager_; 
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.background.IManager] found for dependency: expected at least 1 
bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:506)
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284)
    ... 28 more

Application-Context

<mvc:annotation-driven />
<task:annotation-driven />
<context:annotation-config />
<context:component-scan base-package="com.background" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T20:04:10+00:00Added an answer on June 12, 2026 at 8:04 pm

    The error message says it all: you try to autowire an instance of IManager, but two different Spring components implement this interface, so Spring doesn’t know which one to autowire. You need to use the @Qualifier annotation to specify which one you want Spring to autowire.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me how I can correctly pass my application context to my
I know that in a standalone application I create one of the application context
I'm having an issue with pulling a Spring bean from an application context. When
I am using JNDI to read database configuration from my application's context.xml. The way
General context : MVVM application. I have a View called JobView. Its DataContext is
Context: There's an application where you draw things on canvas. Where user clicks there's
Context In our application, we snapshot data from a database using a query that
In the context of a web application, my old boss always said put a
Context: I'm developing a WPF application which will contain a lot of different screens.
I am making an application which makes use of context menus and has selection.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.