You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2015/04/28 13:25:07 UTC

[jira] [Commented] (FELIX-4868) Framework should not create a classloader for a fragment

    [ https://issues.apache.org/jira/browse/FELIX-4868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14516843#comment-14516843 ] 

Guillaume Nodet commented on FELIX-4868:
----------------------------------------

The problem seems to come from {{BundleWiringImpl#searchDynamicImports()}} which calls {{StatefulResolver#resolve(BundleRevision, String)}}.
This call returns a provider from a fragment instead of from its host.

> Framework should not create a classloader for a fragment
> --------------------------------------------------------
>
>                 Key: FELIX-4868
>                 URL: https://issues.apache.org/jira/browse/FELIX-4868
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: framework-5.0.0
>            Reporter: Jean-Baptiste Onofré
>            Priority: Critical
>             Fix For: framework-5.0.1
>
>
> Assuming we have:
> - bundle A
> - and bundle B which is a fragment to A
> We have classes exported by both bundle A and bundle B, which is not correct: as bundle B is a fragment, it should use the same classloader as the host, so the classloader of bundle A.
> It's the case in Karaf (4.0.0-SNAPSHOT):
> - we have the class org.apache.karaf.shell.commands.basic.AbstractCommand provided by org.apache.karaf.shell.core and org.apache.karaf.shell.console bundles
> - where org.apache.karaf.shell.console is a fragment to org.apache.karaf.shell.core



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)