Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] OSGi/Equinox and Java SPI

As a quick follow-up on my issue, I've had success launching within Eclipse, but not yet from the command line.

The helpful VM arguments were:

-Dorg.osgi.framework.system.packages.extra=[list of versioned packages "exported" by my 3rd party JARs]

According to the documentation, the path to the extra JARs is "relative to the location of the OSGi framework." I am not 100% sure where this means, and the referenced section on locations didn't clear it up for me. I had luck putting the 3rd party JARs in the same location as the framework JAR, and referring to them without any relative path prefix.


-Dosgi.frameworkClassPath=org.eclipse.osgi_3.5.0.v20090520.jar,[my problematic 3rd party JARs]

If you don't include the OSGi framework jar on the list, the framework won't start! That is probably obvious, but it tripped me up for a while.


Thanks for the help thus far,
-Mike







THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.

-----Original Message-----



From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Michael Furtak
Sent: Friday, September 10, 2010 10:45 AM
To: Equinox development mailing list
Subject: Re: [equinox-dev] OSGi/Equinox and Java SPI

Hi Gunnar,

I will try the strategy of placing the JAR on the system classpath and using the org.osgi.framework.system.packages.extra directive to expose the packages to my bundles.

Thanks,
-Mike







THIS MESSAGE IS INTENDED FOR THE USE OF THE PERSON TO WHOM IT IS ADDRESSED. IT MAY CONTAIN INFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the intended recipient, your use of this message for any purpose is strictly prohibited. If you have received this communication in error, please delete the message and notify the sender so that we may correct our records.

-----Original Message-----



From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Gunnar Wagenknecht
Sent: Friday, September 10, 2010 3:17 AM
To: equinox-dev@xxxxxxxxxxx
Subject: Re: [equinox-dev] OSGi/Equinox and Java SPI

Hi Michael,

Am 09.09.2010 14:57, schrieb Michael Furtak:
> 1) Is the general incompatibility between OSGi/Equinox bundles and SPI a
> known issue?

In general, this combination is problematic. It doesn't work at all when
the consumer side only uses the system class loader. There are
workarounds using fragments or buddy class-loading if the consumer side
also is an OSGi bundle.

> 2) Is there a workaround I can use to get things working?

The only workaround for you is to make the library available to the
system classloader. You can then make the library packages available to
your OSGi bundles using boot delegation.

-Gunnar

--
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top