Hello Felix-Users, My question why the RepositoryAdmin can deploy *null* is still open. I think that the method Resolver.deploy() should throw a Exception if the OBR-file is out of sync. with the Repository. The error occurs if and only if at least one bundle is missing in the Repository which is listed in the repository.xml-file. After the deployment the method bundlecontext.getBundles () returns a null object. Well, I have inserted a null check here to catch that.
Anyway... Roland wrote > I use Apache Felix Framework 4.2.1, OSGi Framework 4.3.1 and Felix > Bundlerepository 1.6.6. > My Application loads an OBR like as it is described at > http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html > <http://felix.apache.org/site/apache-felix-osgi-bundle-repository.html> > . The OBR-file is generated by the Maven-OBR-Plugin. If I call > bundlecontext.getBundles() I get a null object. Without the > OBR-functionality everthing works fine. I'm just locateing the error more > precisely. Maybe I do something wrong. But maybe someone has ever had the > same problem and I can save time. > > My question is: Why it is possible to install a null-object as bundle and > how? > > Thanks and Regards > Roland > > Meanwhile, I located the error in my application... > RepositoryAdmin. * > getLocalRepository() * > returns a repository with a null-object in the HashMap. I load this > repository and deploy all Resources as it is described above. Also the > Null object is deployed. This causes a NullPointerException in my > application after evaluating bundlecontext.getBundles(). My OBR-file is > correct. > > This problem can be solved by deleting the felix-cache. -- View this message in context: http://apache-felix.18485.x6.nabble.com/bundlecontext-getBundles-returns-Array-with-a-null-Object-tp5003850p5004207.html Sent from the Apache Felix - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

