[
https://issues.apache.org/jira/browse/FELIX-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749516#action_12749516
]
Richard S. Hall commented on FELIX-1538:
----------------------------------------
This can happen because Felix contains a "hack" to guess when to do a boot
delegation, so if you have not configured boot delegation, then maybe our hack
is guessing incorrectly.
Basically, the hack does this: Before throwing a CNFE, it checks to see if the
class instigating the class load is NOT from a bundle. If it is NOT, then it
assumes it should boot delegate unless the external class was calling
Bundle.loadClass().
It seems your use case should fall into this last case and it should not boot
delegate, but perhaps we are missing a condition.
We can test this, but you will need to update from trunk again. I added a
configuration property to disable this hack, called
felix.bootdelegation.implicit...set it to false in conf/config.properties and
see if it solves the issue.
If so, it would be nice if we could try to debug why the hack guesses
incorrectly. In that case, would it be possible for you to create a
self-contained test case out of your failing test case and send it to me? It
doesn't need to be pretty, just something I can use to recreate the issue.
> Exporter can load classes from importer
> ---------------------------------------
>
> Key: FELIX-1538
> URL: https://issues.apache.org/jira/browse/FELIX-1538
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: felix-2.0.0
> Reporter: Thomas Diesler
> Attachments: jbosgi142-bundleA.jar, jbosgi142-bundleB.jar,
> jbosgi142-bundleX.jar
>
>
> A imports X
> B imports X
> Can X load a class from A or B?
> Can A load a class from B and vice versa?
> testLoadClass(org.jboss.test.osgi.jbosgi142.OSGI142TestCase) Time elapsed:
> 1.743 sec <<< FAILURE!
> java.lang.AssertionError: ClassNotFoundException expected for:
> jbosgi142-bundleX loads org.jboss.test.osgi.jbosgi142.bundleA.BeanA
> at org.junit.Assert.fail(Assert.java:92)
> at
> org.jboss.test.osgi.jbosgi142.OSGI142TestCase.assertBundleLoadClass(OSGI142TestCase.java:105)
> at
> org.jboss.test.osgi.jbosgi142.OSGI142TestCase.testLoadClass(OSGI142TestCase.java:83)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.