protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
BaseClassLoader classloader = getBundleClassLoader(bundle);
if (classloader == null)
throw new FileNotFoundException(url.getPath());
ClasspathManager cpManager = classloader.getClasspathManager();
BundleEntry entry = cpManager.findLocalEntry(url.getPath(), url.getPort());
if (entry == null)
// this isn't strictly needed but is kept to maintain compatibility
entry = cpManager.findLocalEntry(url.getPath());
if (entry == null)
throw new FileNotFoundException(url.getPath());