JBoss EAP throws Spring NoSuchBeanDefinitionException on deployment

Solution In Progress - Updated -

Issue

The following Exception is thrown when I deploy my application using Spring Beans.

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.jboss.support.example.bean.ServiceBean] 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.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:952) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:821) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:735) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:478) [spring-beans-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    ... 35 more

The org.jboss.support.example.bean.ServiceBean is annotated with @Component and is injected in another class using @AutoWired annotation.

Environment

  • Red Hat JBoss Enterprise Application Platform 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.