-
-
Notifications
You must be signed in to change notification settings - Fork 163
Exception in thread "main" 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') #152
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
Comments
Please check the configurations of your server and try it on. |
@wongdh Any solution? |
I also have that problem, has anyone already found a solution? |
i found this, and worked for me. String pathSeparator = Syste .getProperty("path.separator"); from the web site https://blog.codefx.org/java/java-11-migration-guide/#Casting-To-URL-Class-Loader |
Hello, OException in thread "main" 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') Please, Where I do the mistake? Why I can't to create the PDF file? I found that the problem is with options -r Thank you |
I have the same problem. Even just a plain PHP file gives the following warnings when producing the .jasper file: WARNING: An illegal reflective access operation has occurred It does produce the file, however. But when I run the step to create the .pdf, it crashes with: Exception in thread "main" 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') PHP version is PHP 7.2.10 I see above that eduardoit2000 says: i found this, and worked for me. But I don't know what to do with these. jj |
I have the same problem and I fixed it by installing a different jdk version and switch to it. |
What JDK version are you using? can also tell how to specifically install and switch to it? |
@mohamadyuzrie, Open JDK 8 fixed my problem. |
@mohamadyuzrie I was using OpedJDK version 11 & 13 when i had the problem. I fixed it using OracleJDK version 8. I don't know if higher versions will make a difference though. |
Would love to try this, could you share the steps to downgrade process please? Got the package but can't figure out the command line. Thanks in advance. |
Please see my answer to resolve this problem published in the next issue |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
Tried the run the example but unsuccessful. PHP reported
"Your report has an error and couldn 't be processed!\ Try to output the command using the function
output();
and run it manually in the console."i output the command
jasperstarter process "C:\wwwroot\phpjasper\vendor\geekcom\phpjasper\examples\hello_world.jasper" -o "C:\wwwroot\phpjasper\vendor\geekcom\phpjasper\examples" -f pdf rtf
and ran in console and got
Exception in thread "main" 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')
at de.cenote.tools.classpath.ApplicationClasspath.add(ApplicationClasspath.java:75)
at de.cenote.tools.classpath.ApplicationClasspath.add(ApplicationClasspath.java:65)
at de.cenote.tools.classpath.ApplicationClasspath.addJars(ApplicationClasspath.java:134)
at de.cenote.tools.classpath.ApplicationClasspath.addJarsRelative(ApplicationClasspath.java:151)
at de.cenote.jasperstarter.App.processReport(App.java:178)
at de.cenote.jasperstarter.App.main(App.java:109)
my java version as following
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
Please advice. Thank you
The text was updated successfully, but these errors were encountered: