-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix missing class errors #5795
Fix missing class errors #5795
Conversation
|
||
public static AgentLocationStrategy locationStrategy() { | ||
return locationStrategy(null); | ||
return LOCATION_STRATEGY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to confirm the fix is to not pass null
in this codepath?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. The problem is probably that wildfly class loader doesn't unconditionally delegate resource lookups to system loader and isn't able to find resources that are in agent jar. Previously it worked because in AgentLocationStrategy
we added ClassFileLocator
for all parent class loaders, which included system class loader, where the agent is initially loaded. To make resources from agent jar visible we need to add a ClassFileLocator
with bootstrap proxy.
|
||
public static AgentLocationStrategy locationStrategy() { | ||
return locationStrategy(null); | ||
return LOCATION_STRATEGY; | ||
} | ||
|
||
public static AgentLocationStrategy locationStrategy(ClassLoader bootstrapProxy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we can remove this method
Co-authored-by: Lauri Tulmin <[email protected]>
I pulled #5724 into our distro to check out the startup perf improvements and ran into some smoke test failures on Wildfly 11, e.g. below stack trace.
I'll open a tracking issue to investigate why the wildfly smoke tests in this repo didn't catch this, maybe we need a bit more instrumentation (e.g. otel-api) in the servlet test app.