[
https://issues.apache.org/jira/browse/FELIX-3350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207385#comment-13207385
]
Richard S. Hall commented on FELIX-3350:
----------------------------------------
The class we are delegating for may be available, but classes it depends on may
not, which would then result in an NCDFE. When we catch the NCDFE, we just
return null because that will cause a CNFE to be thrown in the caller. We don't
catch the CNFE because that is already the exception type we are expecting to
throw if we fail, so we just let it pass through.
Technically, we could catch either and return null if either occurred, but this
assumes that the deeper CNFE never returns useful in formation.
> ClassNotFoundException missing bundle information when bundle class loader
> fails to find class
> ----------------------------------------------------------------------------------------------
>
> Key: FELIX-3350
> URL: https://issues.apache.org/jira/browse/FELIX-3350
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: framework-4.0.2
> Reporter: David Humeniuk
> Priority: Minor
>
> There is code in BundleWiringImpl, line 1460 that will throw a new
> ClassNotFoundException with bundle information. However, I don't see how
> this code is reached. A ClassNotFoundException will be thrown by the boot
> class loader that is not caught if all other methods fail. See partial stack
> trace below:
> Caused by: java.lang.ClassNotFoundException: org.datanucleus.identity.OIDImpl
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
> at
> org.apache.felix.framework.BundleWiringImpl.doImplicitBootDelegation(BundleWiringImpl.java:1666)
> at
> org.apache.felix.framework.BundleWiringImpl.searchDynamicImports(BundleWiringImpl.java:1603)
> at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1439)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira