I have two bundle say A and B. A depends on B (specified as Required-Bundle:B at A's MANIFEST).
Now I installed both A, B bundles one by one (by calling BundleContext.installBundle). Then when I try to start bundle A, I'm getting following error
org.osgi.framework.BundleException: Could not resolve module: A [140]
Unresolved requirement: Require-Bundle: B; bundle-version="1.0.0"
I understand from the exception that bundle B is not yet started(resolved). Now how to solve this problem?
Only way to solve this problem is sorting bundles by it's dependencies? Or Are there any options like specifying a folder to OSGi runtime so that any bundle files copied to it will be activated?
By the way, I'm using equinox.