Title here
Summary here
Cek status tomcat
systemctl status tomcat
Cek apakah file JavaBridge.war sudah berhasil di deploy tomcat
ls -l /opt/tomcat/webapps
jika file JavaBridge.war
tidak ada pada folder tersebut maka eksekusi perintah di bawah ini:
cd ~
# Alternatif 1
sudo wget https://onboardcloud.dl.sourceforge.net/project/php-java-bridge/Binary%20package/php-java-bridge_7.2.1/php-java-bridge_7.2.1_documentation.zip -O JavaBridge.zip --no-check-certificate
# Alternatif 2 jika alternatif 1 tidak berhasil
sudo wget http://simgos2.simpel.web.id/repos/java/php-java-bridge_7.2.1_documentation.zip -O JavaBridge.zip
sudo unzip -q JavaBridge.zip
sudo rm -rf JavaBridge.zip documentation/
sudo cp JavaBridge.war /opt/tomcat/webapps
systemctl restart tomcat
Remove file Java.inc
cd /var/www/html/production/webapps/webservice
rm -rf serial/Java.inc
Jika sudah dilakukan perintah di atas maka lakukan testing cetak laporan
Jika anda mengalami error seperti ini :
java.lang.Exception: Invoke failed: [[c:JasperFillManager]]->fillReport((o:JasperReport)[o:JasperReport], (i:Map)[o:HashMap], (i:Connection)[o:ConnectionImpl]). Cause: net.sf.jasperreports.engine.JRException: Unable to get value for result set field "KODE" of class java.lang.Integer. VM: 11.0.21@https://www.redhat.com/
Hal tersebut terjadi, karena kode fasyanes melebihi nilai maksimum integer, maka solusinya adalah mengganti type data nya menjadi string saja :
cd /var/www/html/production/webapps/webservice/reports/rl
#!/bin/bash
# Define the directory to start the search from, '.' means the current directory
start_dir="."
# Find all .jrxml files in the directory and its subdirectories
find "$start_dir" -type f -name "*.jrxml" | while read -r file; do
echo "Processing file: $file"
# Execute the updated sed command on the file
sed -i 's/name="KODE" class="java.lang.Integer"/name="KODE" class="java.lang.String"/g' "$file"
done
systemctl restart tomcat
systemctl status tomcat
pastikan runningJika anda mengalami error seperti ini :
java.lang.Exception: Invoke failed: [[c:JasperFillManager]]->fillReport((o:JasperReport)[o:JasperReport], (i:Map)[o:HashMap], (i:Connection)[o:ConnectionImpl]). Cause: net.sf.jasperreports.engine.JRException: Unable to get value for result set field "KODERS" of class java.lang.Integer. VM: 11.0.21@https://www.redhat.com/
Hal tersebut terjadi, karena kode fasyanes melebihi nilai maksimum integer, maka solusinya adalah mengganti type data nya menjadi string saja :
cd /var/www/html/production/webapps/webservice/reports/rl
#!/bin/bash
# Define the directory to start the search from, '.' means the current directory
start_dir="."
# Find all .jrxml files in the directory and its subdirectories
find "$start_dir" -type f -name "*.jrxml" | while read -r file; do
echo "Processing file: $file"
# Execute the updated sed command on the file
sed -i 's/name="KODERS" class="java.lang.Integer"/name="KODERS" class="java.lang.String"/g' "$file"
done
systemctl restart tomcat
systemctl status tomcat
pastikan running