[
https://issues.apache.org/jira/browse/NETBEANS-1774?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iiro Nykänen updated NETBEANS-1774:
-----------------------------------
Description:
We are using a library with fragmented OSGi bundles in our NetBeans Platform
application. The bundles resolve fine, but during runtime the NetigsoLoader
instance that was created for the bundle tries to load classes from the
fragment, instead of the host. This is not desirable, and e.g. Felix throws an
exception (see link 1).
The issue is in Netigso, in the createLoader method, which doesn't handle the
caught BundleException correctly (thrown when trying to start the fragment, see
link 2).
I have fixed this for our application by simply looking up the fragments host
bundle and substituting the fragment with its host in the created NetigsoLoader.
[Apache Felix, class Felix, line
2062|https://github.com/apache/felix/blob/f4892ed21e68dc4c48d8932bb8f311436cfe8399/framework/src/main/java/org/apache/felix/framework/Felix.java#L2062]
Apache NetBeans, class Netigso, line 329
was:
We are using a library with fragmented OSGi bundles in our NetBeans Platform
application. The bundles resolve fine, but during runtime the NetigsoLoader
instance that was created for the bundle tries to load classes from the
fragment, instead of the host. This is not desirable, and e.g. Felix throws an
exception (see link 1).
The issue is in Netigso, in the createLoader method, which doesn't handle the
caught BundleException correctly (thrown when trying to start the fragment, see
link 2).
I have fixed this for our application by simply looking up the fragments host
bundle and substituting the fragment with its host in the created NetigsoLoader.
[Apache Felix, class Felix, line
2062|https://github.com/apache/felix/blob/f4892ed21e68dc4c48d8932bb8f311436cfe8399/framework/src/main/java/org/apache/felix/framework/Felix.java#L2062]
[Apache NetBeans, class Netigso, line
329|https://github.com/apache/incubator-netbeans/blob/4e2b939d7d7f395a245cae6e2a10239e2175eee7/platform/core.netigso/src/org/netbeans/core/netigso/Netigso.java#L329]
I'm not sure how your process goes, but I can drop a pull request of my fix if
you want.
> Netigso tries to load classes from an OSGi fragment bundle instead of the
> host bundle
> -------------------------------------------------------------------------------------
>
> Key: NETBEANS-1774
> URL: https://issues.apache.org/jira/browse/NETBEANS-1774
> Project: NetBeans
> Issue Type: Bug
> Components: platform - Netigso
> Affects Versions: 9.0
> Reporter: Iiro Nykänen
> Priority: Major
> Labels: osgi, pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We are using a library with fragmented OSGi bundles in our NetBeans Platform
> application. The bundles resolve fine, but during runtime the NetigsoLoader
> instance that was created for the bundle tries to load classes from the
> fragment, instead of the host. This is not desirable, and e.g. Felix throws
> an exception (see link 1).
> The issue is in Netigso, in the createLoader method, which doesn't handle the
> caught BundleException correctly (thrown when trying to start the fragment,
> see link 2).
> I have fixed this for our application by simply looking up the fragments host
> bundle and substituting the fragment with its host in the created
> NetigsoLoader.
> [Apache Felix, class Felix, line
> 2062|https://github.com/apache/felix/blob/f4892ed21e68dc4c48d8932bb8f311436cfe8399/framework/src/main/java/org/apache/felix/framework/Felix.java#L2062]
> Apache NetBeans, class Netigso, line 329
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists