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
$jasper = new PHPJasper;
$jasper->process(
$input,
$output,
$options
)->execute();
?>`
The following error occurs in the browser..
Fatal error: Uncaught PHPJasper\Exception\ErrorCommandExecutable: 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. in /var/www/html/vendor/geekcom/phpjasper/src/PHPJasper.php:219 Stack trace: #0 /var/www/html/test2.php(34): PHPJasper\PHPJasper->execute() #1 {main} thrown in /var/www/html/vendor/geekcom/phpjasper/src/PHPJasper.php on line 219
and when running PHP command line i see the following error.
php /var/www/html/test2.php
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)
PHP Fatal error: Uncaught PHPJasper\Exception\ErrorCommandExecutable: 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. in /var/www/html/vendor/geekcom/phpjasper/src/PHPJasper.php:219
Stack trace:
#0 /var/www/html/test2.php(34): PHPJasper\PHPJasper->execute() #1 {main}
thrown in /var/www/html/vendor/geekcom/phpjasper/src/PHPJasper.php on line 219
Here is the XML report definition from Jaspersoft studio.
`
<title>
</title>
`
Any guidance on what I am doing wrong?
Thanks
Malcolm
The text was updated successfully, but these errors were encountered:
I am trying to port my reports from PHPJasperXML to PHPJasper and also move to a LINUX server.
Installed using composer ... All OK
Java is installed
I have successfully compiled a test report under linux using the example code as follows
<?php require __DIR__ . '/vendor/autoload.php'; use PHPJasper\PHPJasper; $input = __DIR__ . '/reports/test1.jrxml'; $jasper = new PHPJasper; $jasper->compile($input)->execute(); ?>
Then set the executable directory...
sudo chmod +x /var/www/html/vendor/geekcom/phpjasper/bin/jasperstarter/bin
The trying to run the report using this code
`<?php
require DIR . '/vendor/autoload.php';
use PHPJasper\PHPJasper;
$input = DIR . '/reports/test1.jasper';
$output = DIR . '/printed_reports';
$options = [
'format' => ['pdf'],
'locale' => 'en',
'params' => [],
'db_connection' => [
'driver' => 'mysql',
'username' => 'myUsername',
'password' => 'myPassword',
'host' => 'localhost',
'database' => 'wms_mfsl',
'port' => '3306'
]
];
$jasper = new PHPJasper;
$jasper->process(
$input,
$output,
$options
)->execute();
?>`
The following error occurs in the browser..
and when running PHP command line i see the following error.
Here is the XML report definition from Jaspersoft studio.
<title> </title>`
Thanks
Malcolm
The text was updated successfully, but these errors were encountered: