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

java.lang.ClassCastException: class jdk.internal.loader.ClassLoaders$AppClassLoader cannot be cast to class java.net.URLClassLoader (jdk.internal.loader.ClassLoaders$AppClassLoader and java.net.URLClassLoader are in module java.base of loader 'bootstrap') #16

Open
mehmet-27 opened this issue Jun 27, 2023 · 2 comments

Comments

@mehmet-27
Copy link

in my librarymanager implement classloader is throwing error
image
image

@frengor
Copy link
Collaborator

frengor commented Jul 31, 2023

jdk.internal.loader.ClassLoaders$AppClassLoader doesn't extends java.net.URLClassLoader, so URLClassLoaderHelper cannot be used: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/jdk/internal/loader/ClassLoaders.java

@SNWCreations
Copy link

SNWCreations commented Jul 27, 2024

Java 9+ module system caused this. Use a single URLClassLoader for your Bot application to solve this? Not this library's fault due to the environment they supported are all use URLClassLoader in the classloading context.

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

3 participants