OBR fails to take bundles into account that are already available in the
framework
----------------------------------------------------------------------------------
Key: FELIX-1621
URL: https://issues.apache.org/jira/browse/FELIX-1621
Project: Felix
Issue Type: Bug
Components: Bundle Repository (OBR)
Affects Versions: felix-2.0.0
Environment: linux with JDK 1.6 update 16
Reporter: Jochen
Create a bundle called 'base'. Create another bundle called 'dep'. 'dep' has to
depend on 'base'.
Deploy 'base' into felix. Keep 'dep' in a separate directory. Use bindex.jar
(from osgi.org) to create the obr.xml.
Create a third bundle with the following code in the activator:
RepositoryAdmin repositoryAdmin = (RepositoryAdmin)
arg0.getService(arg0.getServiceReference(RepositoryAdmin.class.getName()));
try {
repositoryAdmin.addRepository((new File(
"/<pathtorep>/obr.xml")).toURI().toURL());
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
Resolver resolver = repositoryAdmin.resolver();
resolver.add(repositoryAdmin.discoverResources("(&(symbolicname=<nameof'dep'>))")[0]);
if (resolver.resolve()) {
resolver.deploy(true);
} else {
Requirement[] reqs =
resolver.getUnsatisfiedRequirements();
for (int i = 0; i < reqs.length; i++) {
System.out.println("Unable to resolve: " +
reqs[i].getFilter());
}
}
When the bundle is started it will give us the message that the 'base' bundle
is not available although it is deploied and started in the framework.
This issue is somewhat related to
http://issues.apache.org/jira/browse/FELIX-280.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.