While migrating existing spring project to osgi karaf, we are facing the problem while import resource from the dependent bundle.Eg.
Bundle A has the appcontxt-A.xml
and Bundle B which has appcontext-B.xml
.
Here I am referring appcontxt-A.xml
in Bundle B as (<import resource="classpath:appContext-A.xml" />)
for which I am getting Caused by: java.io.FileNotFoundException: class path resource [appContext-A.xml] cannot be opened because it does not exist.
How I can achieve the above defined scenario.Thanks in advance.
After long research resolved the file doesnt exist issue was resolved by (adding * after classpath) . However while accessing "context:annotation-config" there is another issue Unable to locate Spring NamespaceHandler for XML schema namespace [http://www.springframework.org/schema/context], Any help to resolve this issue?