2han9wen71an opened a new pull request, #448: URL: https://github.com/apache/skywalking-java/pull/448
- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking-java/blob/main/CHANGES.md). Reason: --- In osgi environment, each bundle has its own unique class loader, while `skywalking agent` runs in the system `AppClassLoader`, which will cause Skywalking plugin injection to fail Solution: --- Check the system and find that the Skywalking plugin uses `AgentClassLoader` to override `loadClass` and `findResources` for loading and processing, which is not a problem in a normal java environment, because the application package and Agent are in the `AppClassLoader`. We need to adjust the `AgentClassLoader` to adjust the class loader of the bundle to the `parent` of the AgentClassLoader, at this time the AgentClassLoader can access both the content in the bundle and the skywalking plugin, after consulting the information, we found that the JDK provides `URLClassLoader` just meet the conditions, so I carried out this refactoring Because of writing test cases to get the plug-in class need to write dead plug-in path, but plug-in we are not 100% enabled, so this PR I did not provide test cases, but in my local `Polarion` environment through the implementation -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
