I am developing an application using Spring OSGi and IBM WebSphere liberty. I have one WAB bundle which has all controller classes and have another bundle which has all utility/service/dto/model classes.
I loaded the utility bundle to a shared repository and I am trying to autowire the class from the share repo bundle. The problem I am facing is, I am unable to autowire the class (Class is annotated with @Service) from external OSGi jar to WAB bundle. I am getting an exception during the autowire process, which says:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [x.y.z.CodeExternalAutowire] found for dependency [x.y.z.CodeExternalAutowire]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
I have verified that the external OSGi jar bundle and package are loaded but am unable to autowire the package class from the WAB. Appreciate if anyone can help me with this.