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

Fix assumption that AVM is loaded by system ClassLoader #331

Closed
jeff-aion opened this issue Dec 31, 2018 · 1 comment
Closed

Fix assumption that AVM is loaded by system ClassLoader #331

jeff-aion opened this issue Dec 31, 2018 · 1 comment
Assignees

Comments

@jeff-aion
Copy link
Contributor

External attempts to embed AVM in its own ClassLoader are failing due to the assumption the implementation has that the core AVM classes are loaded by the system ClassLoader. This typically manifests as something along the lines of java.lang.NoClassDefFoundError: org/aion/avm/internal/IDeserializer

There are a few places where this assumption is being made:

  • Verifier explicitly creates VerifierClassLoader
  • AvmSharedClassLoader implicitly uses the system ClassLoader as a parent

The main question is how we want to test this. It is still far more convenient for the common-case to load the AVM from the system so should we handle this case as an explicitly different kind of unit test which builds its own ClassLoader or go even further to running this as a test on the final distribution shape?

@jeff-aion jeff-aion self-assigned this Dec 31, 2018
@jeff-aion
Copy link
Contributor Author

Our current thinking is that we will add the test at the top-level, operating on the avm.jar as produced for the dist directory, as that is currently the unit we are expecting to be embedded. This decision may change as we develop a more concrete sense of the embedding use-cases and what is actually required for that case.

As part of this test, we can also add an attempt to build and deploy one of our dist examples, to make sure that this is working as we expect.

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