Community
Participate
Working Groups
If i reinstall a singleton-bundle via equinox-console than I got an BundleException 'Reason: Another singleton version selected ...'. reinstall == install+uninstall+install (with -start) ===> Howto reproduce: <=== open Console 'Host OSGi Console' osgi> install -start file:/my.bundle.jar [bundle.id] osgi> uninstall [bundle.id] osgi> install -start file:/my.bundle.jar BundleException ... ===> my.bundle.jar/MANIFEST.MF <==== Bundle-SymbolicName: my.bundle;singleton=true I would expect that the 'uninstall-command' the bundle removed/deleted/... . And next 'install-command -start' a new my.bundle installed.
What version of Equinox are you using. Is it the version included in Eclipse 4.2? If so could you try on the latest release (Luna). I suspect this is because you are not doing a refresh operation after uninstalling the bundle. Try running 'refresh' after uninstall. Prior to the Luna release the framework had cases where uninstalled bundles would not get auto-flushed from the system without a refresh operation. Even in the new framework (in Luna) there are valid cases where an uninstalled bundle cannot be completely flushed from the system until a refresh operation is done. This can happen if the uninstalled bundle exports packages and there are still one or more other bundles that either import package from the uninstalled bundle or require the uninstalled bundle. Uninstalling a bundle in this kind of situation puts the bundle in a 'removal pending' state because we cannot yank the packages out from under the other class loaders in the framework that are still using the uninstalled bundle's content.
I using org.eclipse.osgi_3.9.1.v20140110-1610 ( kepler:( ) Thanks Thmomas, for Your quick answer. `refresh` is no alternative. Because 1) install my.bundle_this-version.jar & uninstall 2) install my.bundle_that-version.jar I will switch to luna as soon as possible.
(In reply to Jan Winter from comment #2) > I using org.eclipse.osgi_3.9.1.v20140110-1610 ( kepler:( ) > > Thanks Thmomas, for Your quick answer. > > `refresh` is no alternative. Because > 1) install my.bundle_this-version.jar & uninstall > 2) install my.bundle_that-version.jar > When I say refresh I mean just run the 'refresh' command after uninstall with no parameters.
`refresh` after `uninstall` not help.
I'm not able to reproduce this (even without doing a refresh) on Kepler. I'm using a very simple bundle though. Could you attach a test bundle that reproduces this issue?
Marking as WORKSFORME based on comment 5. If you can still reproduce the problem, please reopen and provide information requested in comment 5.