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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content