I have been scratching my head for hours now trying to figure out why a basic bundle with a dependency on org.eclipse.core.runtime won't resolve in the user region.
The user console tells me that the package is there, and has been imported by the org.springframework.core bundle.
osgi> p org.eclipse.core.runtime
org.eclipse.core.runtime; version="3.4.0"<org.eclipse.equinox.common_3.6.100.v20120509-1351 >
org.springframework.core_3.1.0.RELEASE  imports
However if I put the attached MANIFEST.MF in repository/usr/my-test/META-INF and try to start that bundle I get this resolver error:
*** BEGIN RESOLUTION ***
** RESOLVING [..._7.4.0.001] **
Trying to resolve: [..._7.4.0.001], org.eclipse.core.runtime
** IMPORT org.eclipse.core.runtime[..._7.4.0.001] failed to resolve
[..._7.4.0.001] NOT RESOLVED
*** END RESOLUTION ***
I have tried using all combinations of bundleImports and packageImports in userregion.properties to import the package (org.eclipse.core.runtime) and/or the bundle (org.eclipse.equinox.common) into the user region, that doesn't to make any difference.
I am really at a loss here, help would be greatly appreciated!
org.eclipse.equinox.common is a singleton bundle, and I just found this statement by Glynn in an old post on the dev list:
"These two properties will interact as follows. If a singleton bundle is specified in both these properties and is resolved first in the kernel region, then it will fail to resolve in the user region since the singleton is imported from the kernel region. However, resolving in the opposite order is a little tricky. Suppose the singleton in the user region is resolved first. Then I think it would be necessary to fail the resolution of the singleton in the kernel region even though the singleton bundle is not imported from the user region to the kernel region."
Not sure how relevant that is, but is there anything special about exporting singleton bundles to the user region?
I think the issue is really simple -- if maddeningly frustrating -- the spring framework is importing an older version of the bundle then has been resolved for your build. Try explicitly specifying 3.6.0 as the runtime bundle for your built bundle.