You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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')
#350
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.
Hi,
Been working on this for a few days and I can't solve this. Whenever I wanna process a .jasper it doesn't work and I get that error instead. I'm working with php 8.1.25, xampp v3.3.0 and since I started 'til now I've been changing my jdk version. At first I thought it was a JasperReports library version (changed it too from 7.0.1 to 6.4.3 on Jaspersoft Studio), then I read something about the jdk but I've tried with jdk 17 (the first one), jdk 1.8.0_60, jdk 1.8.0_251 and now I'm currently with 1.7.0_80 and still the same. I've also tried to generate the pdf using the console but it doesn't work either. Now I'm trying with the hello_world example but the output is the same error/exception
use PHPJasper\PHPJasper;
public function crearReporteArticulo($eventoId, $articuloId)
{
require base_path('/vendor/autoload.php');
$input = __DIR__ . '/vendor/geekcom/phpjasper/examples/hello_world.jasper';
$output = __DIR__ . '/vendor/geekcom/phpjasper/examples';
$options = [
'format' => ['pdf', 'rtf']
];
$jasper = new PHPJasper();
$jasper->process(
$input,
$output,
$options
)->execute();//here it crashes
}
The text was updated successfully, but these errors were encountered:
Any one to help me solve?
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(Applic
ationClasspath.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)
JAVA_HOME: C:\Program Files\Java\jdk1.8.0_202
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)
i Try to putenv but dont solve.
putenv("JAVA_HOME=C:\Program Files\Java\jdk1.8.0_202");
putenv("PATH=" . getenv("JAVA_HOME") . "\bin;" . getenv("PATH"));
//putenv("JAVA_OPTS=--add-opens=java.base/jdk.internal.loader=ALL-UNNAMED");
Hi,
Been working on this for a few days and I can't solve this. Whenever I wanna process a .jasper it doesn't work and I get that error instead. I'm working with php 8.1.25, xampp v3.3.0 and since I started 'til now I've been changing my jdk version. At first I thought it was a JasperReports library version (changed it too from 7.0.1 to 6.4.3 on Jaspersoft Studio), then I read something about the jdk but I've tried with jdk 17 (the first one), jdk 1.8.0_60, jdk 1.8.0_251 and now I'm currently with 1.7.0_80 and still the same. I've also tried to generate the pdf using the console but it doesn't work either. Now I'm trying with the hello_world example but the output is the same error/exception
The text was updated successfully, but these errors were encountered: