Unable to load JasperReports classes in PHP script using JavaBridge and Docker

36 views Asked by At

I’m using Docker to run a PHP script that uses JavaBridge to connect to a Java server. I have installed JavaBridge, Tomcat, and JasperReports. When I run my PHP script, standard Java classes such as java.util.ArrayList work fine, but I’m unable to load JasperReports classes such as net.sf.jasperreports.engine.JasperFillManager.

I’ve tried setting the CLASSPATH environment variable in various ways, including in my docker-compose configuration (CLASSPATH=/opt/bitnami/jasperreports/WEB-INF/lib/*), through the terminal, and in an environment file. I’ve also tried adding different folders containing JAR files to the CLASSPATH. However, the JasperReports classes still cannot be found.

Does anyone have any suggestions on how to resolve this issue? Any help would be greatly appreciated!

0

There are 0 answers