Would it make sense to check the bundle state before loading the class? Made a quick test and bundles which were uninstalled are still present in the BundleContext and are able to load classes/resources.