Skip to content
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

The JVM's system class loader isn't initialized correctly #529

Closed
pron opened this issue Oct 23, 2014 · 1 comment
Closed

The JVM's system class loader isn't initialized correctly #529

pron opened this issue Oct 23, 2014 · 1 comment

Comments

@pron
Copy link

pron commented Oct 23, 2014

The class path passed to Java must be visible by the system class loader. As it stands in OSv, it is only available to the AppClassLoader. This doesn't comply with the spec and has major implications:

  • Java agents don't (generally) work. See Java agents aren't (really) supported #528
  • Calls to ClassLoader.getSystemResource, ClassLoader.getSystemResources, and ClassLoader.getSystemResourceAsStream will fail to find resources.
  • Calls to ClassLoader.findSystemClass will fail to find the class
  • All custom class loaders created by the application with no explicit parent use the system class loader as their parent. As the system class loader is not initialized properly, all such class loaders will fail to behave as expected.
@pron
Copy link
Author

pron commented Oct 23, 2014

Sorry, I filed the issue too quickly. OSv's system class loader delegates to the AppClassLoader so all of the above should work except for agents.

@pron pron closed this as completed Oct 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant