Hi Robert,

this 3rd party library is a bit complicated ... from what I understood it
hasn't been developed with OSGI in mind (but rather for application server
use), and fiddles around with classloaders etc. I was told that the this
library internally internally loads classes from the JVM, effectivly
ignoring the OSGI classloader partially.

Our idea is allow this bundle (we packaged the library into a single
bundle) to use the javax.activation classes from the JVM directly, and
ignore the sling bundle for it; all the other bundles are supposed to use
the sling bundle though. This would have the least impact to the rest of
the system.

Today we tried to export the JVM classes by fragment bundle with the export
statement "javax.activation;version=0.0.1" and import this version from the
bundle; while this made the bundle use the fragment as we intended, all
other bundles were now using this fragment as well (which was not our plan).

Do you see any other option we can try?

Am Mo., 13. Aug. 2018 um 11:05 Uhr schrieb Robert Munteanu <

> Hi Jörg,
> On Fri, 2018-08-10 at 11:06 +0200, Jörg Hoh wrote:
> > and it turns
> > it that this library uses both the JVM-provided classes as well as
> > the
> > classes provided by the sling bundle, thus failing to run properly.
> What error do you get? Is it the cheerful uses constraints violation?
> One possible problem is that the packages exported by the Sling are not
> substitutable with the ones exported by the JVM, thus leading to
> inconsistent class spaces.
> One possible solution is to tweak the packages exported by the JVM so
> that they are substitutable with the ones form the Sling bundle.
> But that leads me to the question - do you export javax.activation from
> both the system bundle and the Sling bundle?
> Thanks,
> Robert
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org
> For additional commands, e-mail: users-h...@felix.apache.org

Jörg Hoh,

Twitter: @joerghoh

Reply via email to