Skip to content

Commit 4eb07e3

Browse files
authored
Add JBoss support through mount agent by ModuleClassloader. (#527)
- Change the classloader to locate the agent path in AgentPackagePath, from `SystemClassLoader` to AgentPackagePath's loader.
1 parent 6e6aafe commit 4eb07e3

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Release Notes.
1414
* [Chore] Exclude org.checkerframework:checker-qual and com.google.j2objc:j2objc-annotations
1515
* [Chore] Exclude proto files in the generated jar
1616
* Fix Jedis-2.x plugin can not get host info in jedis 3.3.x+
17+
* Change the classloader to locate the agent path in AgentPackagePath, from `SystemClassLoader` to AgentPackagePath's loader.
1718

1819
#### Documentation
1920

apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/boot/AgentPackagePath.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static boolean isPathFound() {
4949
private static File findPath() throws AgentPackageNotFoundException {
5050
String classResourcePath = AgentPackagePath.class.getName().replaceAll("\\.", "/") + ".class";
5151

52-
URL resource = ClassLoader.getSystemClassLoader().getResource(classResourcePath);
52+
URL resource = AgentPackagePath.class.getClassLoader().getResource(classResourcePath);
5353
if (resource != null) {
5454
String urlString = resource.toString();
5555

0 commit comments

Comments
 (0)