[FAQ] How to make SkyWalking Java agent works in OSGI environment?
#10342
wu-sheng
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How to make SkyWalking agent works in
OSGIenvironment?OSGIimplements its own set of modularity, which means that eachBundlehas its own unique class loader for isolating different versions of classes.By default, OSGI runtime uses the boot classloader for the bundle codes, which makes the
java.lang.NoClassDefFoundErrorexception in the booting stage.How to resolve this issue?
OSGItoAppClassLoader, through the specific parameterorg.osgi.framework.bundle.parent=app.The list of parameters can be found in the OSGI API
SkyWalkingrelated classes to the bundle parent class loader,AppClassLoader, with the parameterorg.osgi.framework.bootdelegation=org.apache.skywalking.apm.*or
org.osgi.framework.bootdelegation=*. This step is optional. Some OSGi implementations (i.e. Equinox) enable them by defaultSource from https://skywalking.apache.org/docs/skywalking-java/next/en/faq/osgi/
Beta Was this translation helpful? Give feedback.
All reactions