i have tried to make a report with JasperReport using JavaBridge AND PHP

0

Hi everyone.

i have tried make a report in JasperReport with PHP through JavaBridge since three days, i dont have achieved it.

Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: CreateInstance failed: new org.altic.jasperReports.JdbcConnection. Cause: java.lang.ClassNotFoundException: 

More details:

org.altic.jasperReports.JdbcConnection VM: 1.7.0_80@http://java.oracle.com/" at: #-11 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720) #-10 org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) #-9 java.lang.Class.forName0(Native Method) #-8 java.lang.Class.forName(Unknown Source) #-7 php.java.bridge.Util.classForName(Util.java:780) #-6 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:469) #-5 php.java.bridge.parser.Request.handleRequest(Request.java:467) #-4 php.java.bridge.parser.Request.handleRequests(Request.java:509) #-3 php.java.bridge.http.ContextRunner.run(ContextRunner.java:143) #-2 php.java.bridge.util.ThreadPool$Delegate.run(ThreadPool.java:60) #-1 php.java.bridge.util.AppThreadPool$Delegate.run(AppThreadPool.java:1) #0 http://localhost:8080/JavaBridge/java/Java.inc(253): java in http://localhost:8080/JavaBridge/java/Java.inc on line 216

______________________________________________________________________________________________________________________________________________________________

I installed JavaBridge OK, I Excecute the test and it show the properties

<?php 
require_once("http://localhost:8080/JavaBridge/java/Java.inc");
$System = java("java.lang.System");
echo $System->getProperties();
?>

I  have downloaded the php-jru file AND i included it in my PHP project. I copied the java libs in folder tomcat\webapps\JavaBridge\WEB-INF\lib\

commons-beanutils.jar

commons-collections.jar

commons-digester.jar

commons-javaflow.jar

commons-logging.jar

groovy-all.jar

itext.jar

jasperreports.jar

jasperreports-fonts.jar

jasperreports-javaflow.jar

jcommon.jar

jfreechart.jar

mysql-connector-java.jar

png-encoder.jar

poi.jar

postgresql.jar

servlet-api.jar

 

HELP ME, PLEASE

diegojmp's picture
Joined: Aug 27 2017 - 7:27am
Last seen: 1 year 12 months ago
THIS is my Code
 
require_once ('http://localhost:8080/JavaBridge/java/Java.inc');
require './java/php-jru/php-jru.php';
 
$jru = new PJRU();
$reporte = 'C://xampp//htdocs//asistencia//reportes//report2.jaster';
$salidaReporte = 'C://xampp//htdocs//asistencia//reportes//' . $filename;
 
$parametro = new Java('java.util.HashMap');
 
$Conn = new Java("org.altic.jasperReports.JdbcConnection");    
$Conn->setDriver("org.postgresql.Driver");
$Conn->setConnectString("jdbc:postgresql://localhost/ticket");
$Conn->setUser("postgres");
$Conn->setPassword("");
 
$jru->runReportToPdfFile($reporte, $salidaReporte, $parametro, $conexion->getConnection()); 

diegojmp - 1 year 12 months ago

0 Answers:

No answers yet
Feedback