Hi
I don't know where to post this issue but it seems the new version of Java doesn't play very well with jasperstarter
```
./jasperstarter process /home/user/hello-wiorld.jasper -f pdf -r ~/Desktop -P hello=1
Exception in thread "main" java.lang.ClassCastException: jdk.internal.loader.ClassLoaders$AppClassLoader (in module: java.base) cannot be cast to java.net.URLClassLoader (in module: java.base)
at de.cenote.tools.classpath.ApplicationClasspath.add(ApplicationClasspath.java:72)
at de.cenote.tools.classpath.ApplicationClasspath.add(ApplicationClasspath.java:62)
at de.cenote.tools.classpath.ApplicationClasspath.addJars(ApplicationClasspath.java:127)
at de.cenote.tools.classpath.ApplicationClasspath.addJarsRelative(ApplicationClasspath.java:142)
at de.cenote.jasperstarter.App.processReport(App.java:169)
at de.cenote.jasperstarter.App.main(App.java:102)
```
Ubuntu 16.04 (64bit)
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
Hi Ricardo,
this seems to be a general problem with Java9 which affects other applications to.
See https://community.oracle.com/thread/4011800
Thank you for reporting
Regards
Volker
Hi Ricardo,
I just enabled a Java9 build pipeline.
Interestingly a full build works if tests are skipped.
But instead of a nice exception I get a core dump on tests:
#(...)
fill from jsondatasource
#
A fatal error has been detected by the Java Runtime Environment:
#
SIGSEGV (0xb) at pc=0x00007fea398ce009, pid=626, tid=627
#
JRE version: OpenJDK Runtime Environment (9.0) (build 9-internal+0-2016-04-14-195246.buildd.src)
Java VM: OpenJDK 64-Bit Server VM (9-internal+0-2016-04-14-195246.buildd.src, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
Problematic frame:
C [libjava.so+0x1d009] JNU_GetEnv+0x19
#
Core dump will be written.
#(...)
Hi Volker,
Really I don't have any idea with Java but thanks for your effort in your project.
Regards,
Ricardo
This issue first popped up with Java9 but Java10, Java11 and Java12 worked for some time.
Unfortunately there was no test that invoked the ApplicationClasspath.add function.
Now, any Java Version >= Java9 throws a ClassCastException when trying to cast the systemClassLoader to an URLClassLoader.
Thanks to Rafael for pointing out the details in the disscussion forum.
See: https://blog.codefx.org/java/java-11-migration-guide/#Casting-To-URL-Class-Loader
Disscussion on this: https://sourceforge.net/p/jasperstarter/discussion/general/thread/408babe1eb/