Reputation: 13
I am getting below message while deploying spring MVC application into Weblogic (12.2.1.3.0)
NoSuchBeanDefinitionException:No qualifying bean of type [weblogic.messaging.saf.internal.SAFServerService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.inject.Inject(), @javax.inject.Named(value=SAFServerService)
Please help.
Upvotes: 1
Views: 1241
Reputation: 89
Spring can automatically detect classes and register beans. see details at Classpath scanning and managed components.
Adding inside to skip the concerned Java packages related to com.oracle and IBM, which are not used or referenced directly by the application, should prevent the errors from happening during deployment. In the involved war file, the application has used Spring application-context.xml at /WEB-INF/classes/../../ for allowing the search for classes annotated with @Component, @Repository, @Service, and @Controller in Spring classpath.
Example of the application-context.xml :-
<context:component-scan base-package="com,test" scoped-proxy="no">
<context:exclude-filter type="regex" expression="com\.oracle.*" />
<context:exclude-filter type="regex" expression="com\.ibm.*" />
</context:component-scan>
Upvotes: 2