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

CodePage.getCodePageByClass sometimes gives ClassNotFoundException from Maven #273

Closed
schaloner-kbc opened this issue Apr 8, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@schaloner-kbc
Copy link
Contributor

When running a Maven build of a project, a ClassNotFoundException is thrown when a custom codepage is used. Through debugging, it can be seen this is linked to the classloader used by Class.forName(String) not having visibility of the requested class. By specifying a classloader to use, this can be avoided.

To Reproduce

Tricky. While this is happening consistently in Maven builds on both Mac and Windows, I can't reproduce it in the tests here. The associated pull request has updated how an instance of the class is obtained, and all existing tests still pass.

Expected behaviour

A custom CodePage instance should be created.

Additional context

Interestingly, this issue does not occur when the tests are run from IntelliJ.

@schaloner-kbc schaloner-kbc added the bug Something isn't working label Apr 8, 2020
@yruslan
Copy link
Collaborator

yruslan commented Apr 8, 2020

Interesting. Will take a look.

@yruslan
Copy link
Collaborator

yruslan commented Apr 14, 2020

Thanks for the PR! Releasing 2.0.7 which contains the fix...

@yruslan yruslan closed this as completed Apr 14, 2020
@schaloner-kbc
Copy link
Contributor Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants