Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSGi install fails because sun.misc package is not exported via Felix #3516

Closed
dzharikhin opened this issue Nov 11, 2015 · 4 comments
Closed
Labels

Comments

@dzharikhin
Copy link

Hi!, trying to install bundle I get this one
org.osgi.framework.BundleException: Unresolved constraint in bundle io.reactivex.rxjava [274]: Unable to resolve 274.0: missing requirement [274.0] package; (package=sun.misc)
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1709)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892)

I see there is fallback implemented in src if Unsafe is unavailable,
but in MANIFEST.MF package sun.misc is still strongly required.
It would be nice to make resolution:=optional for this package because its absence breaks nothing inside

@2686747
Copy link

2686747 commented Nov 11, 2015

To append packages to the default set of exported system packages add needed value to this propertie:
org.osgi.framework.system.packages.extra=sun.misc

@dzharikhin
Copy link
Author

It is wrong way. This package is not public any way. And that package import is really optional - I see there is fallback implemented already)

@nedtwigg
Copy link

nedtwigg commented Mar 2, 2016

You can also fix this by adding com.diffplug.osgi:com.diffplug.osgi.extension.sun.misc:0.0.0 from MavenCentral. See here for more details on extension bundles.

@akarnokd
Copy link
Member

Thanks for the help @2686747 and @nedtwigg !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants