[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
-
How to make SkyWalking agent works in
OSGI
environment?OSGI
implements its own set of modularity, which means that eachBundle
has 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.NoClassDefFoundError
exception in the booting stage.How to resolve this issue?
OSGI
toAppClassLoader
, through the specific parameterorg.osgi.framework.bundle.parent=app
.The list of parameters can be found in the OSGI API
SkyWalking
related 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