0

I am trying to generate a feature.xml with a third party bundle. When I attempt to install this feature, this third party bundle indicates that it needs sun.reflect to be resolved.

I am using karaf maven plugin features generator goal

this is my error

missing requirement [com.sparkjava.spark-core [104](R 104.0)] osgi.wiring.package; (osgi.wiring.package=sun.reflect)]]

I would prefer to not add this into system packages to be exported by osgi.

treefrog
  • 1,027
  • 1
  • 15
  • 30

1 Answers1

0

For one, Karaf can't auto-export this package as it might not be available with a non-Oracle JVM. That said, you're able to edit the jre.properties file in etc yourself and there you can add the required package as exported by the system bundle. Check also the documentation

For JRE 1.8 it wold look a bit like the following:

jre-1.8= \
 javax.accessibility, \
 javax.activation;version="1.1", \
 javax.activity, \
 javax.annotation;version="1.0", \
 javax.annotation.processing;version="1.0", \
 javax.crypto, \
 ...
 sun.reflect
Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22