Announcement Announcement Module
No announcement yet.
Why I get a NoSuchBeanDefinitionException? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why I get a NoSuchBeanDefinitionException?

    In a Spring configuration file, I have
       <bean id="myBean" class="..." />
    And in a Java class, I have
    private MyClass myBean;
    I get an exception
    org.springframework.beans.factory.NoSuchBeanDefini tionException: No bean named 'myBean' is defined.
    I use @autowired and get the same exception with a message "No qualifying bean of type ... found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency ..."

    There are two signs in the shape of "(" and ")" above and below the bean definition with a message "advised by org.springframework.transcation.interceptor.invole (org.aopalliance.intercept.MethodInvocation)" and a message "7
    Spring AOP market at this line" on the left side of the configuration file. Are they the causes? If so, how to solve it?

    Spring version 3.1