Hola comunidad, buen dia
En el ambiente de produccion (v 2.7.0) tenemos jasper funcionando ok con todos los reportes de diaguita. El java instalado es
java version “1.7.0_181”
OpenJDK Runtime Environment (IcedTea 2.6.14) (7u181-2.6.14-2~deb8u1)
OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)
En testing en el día de ayer actualizamos Diaguita de 2.7.0 a 3.0.0 y luego a 3.0.1. Cuando quiero ver un reporte (por ej etiquetas, bienes patrimoniales, etc - sucede con todos) queda la pantalla en blanco (adjunto screen). La versión de java instalada acá es:
java version “1.7.0_151”
OpenJDK Runtime Environment (IcedTea 2.6.11) (7u151-2.6.11-2~deb8u1)
OpenJDK 64-Bit Server VM (build 24.151-b01, mixed mode)
(En lo que respecta a java no hicimos ninguna modificacion, es la misma que teniamos funcionando con jasper para la 2.7.0 en testing)
En el log de los reportes dice lo siguiente
root@SVR-XPREAPP-03:/var/log# tail -n1000 diaguita_reportes.log
Dec 02 09:26:24 VMBridge INFO : VM : 1.7.0_151@http://java.oracle.com/
Dec 02 09:26:24 VMBridge INFO : VMBridge version : 5.5.2
Dec 02 09:26:24 VMBridge INFO : logFile : /var/log/diaguita_reportes.log
Dec 02 09:26:24 VMBridge INFO : default logLevel : 3
Dec 02 09:26:24 VMBridge INFO : socket : SERVLET_LOCAL:8081
Dec 02 09:26:24 VMBridge INFO : java.ext.dirs : /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext
Dec 02 09:26:24 VMBridge INFO : php.java.bridge.base: /root
Dec 02 09:26:24 VMBridge INFO : thread pool size : 20
Dec 02 09:26:24 VMBridge INFO : JavaBridgeRunner started on port INET_LOCAL:8081
log4j:WARN No appenders could be found for logger (net.sf.jasperreports.extensions.ExtensionsEnvironment).
log4j:WARN Please initialize the log4j system properly.
Dec 02 09:30:13 VMBridge ERROR: An exception occured: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser. -- Unable to call the method, see the README section "Java platform issues" for details and DO NOT REPORT THIS PROBLEM TO THE PHP/Java Bridge MAILING LIST!
java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser. -- Unable to call the method, see the README section "Java platform issues" for details and DO NOT REPORT THIS PROBLEM TO THE PHP/Java Bridge MAILING LIST!
at php.java.bridge.JavaBridge.getUnresolvedExternalReferenceException(JavaBridge.java:431)
at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1066)
at php.java.bridge.Request.handleRequest(Request.java:415)
at php.java.bridge.Request.handleRequests(Request.java:491)
at php.java.bridge.http.ContextRunner.run(ContextRunner.java:146)
at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:124)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:89)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:104)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:62)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:148)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:311)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:772)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1054)
... 4 more
log4j:WARN No appenders could be found for logger (net.sf.jasperreports.extensions.ExtensionsEnvironment).
log4j:WARN Please initialize the log4j system properly.
Dec 02 09:38:36 VMBridge ERROR: An exception occured: java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment. -- Unable to call the method, see the README section "Java platform issues" for details and DO NOT REPORT THIS PROBLEM TO THE PHP/Java Bridge MAILING LIST!
java.lang.ClassNotFoundException: Unresolved external reference: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment. -- Unable to call the method, see the README section "Java platform issues" for details and DO NOT REPORT THIS PROBLEM TO THE PHP/Java Bridge MAILING LIST!
at php.java.bridge.JavaBridge.getUnresolvedExternalReferenceException(JavaBridge.java:431)
at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1066)
at php.java.bridge.Request.handleRequest(Request.java:415)
at php.java.bridge.Request.handleRequests(Request.java:491)
at php.java.bridge.http.ContextRunner.run(ContextRunner.java:146)
at php.java.bridge.ThreadPool$Delegate.run(ThreadPool.java:60)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:195)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:90)
at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:124)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:89)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:104)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:62)
at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179)
at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:148)
at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:311)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:772)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1054)
Tambien ajdunto captura de la pantalla de Diaguita —> Servicio de reportes JasperReports para la generación de los PDF donde se ve que 3 chequeos están ok
Por ultimo probé en el archivo diaguita_reportes.sh agregarle -Djava.awt.headless=true Pero persiste la falla. Queda la pantalla en blanco (sin errores ni tampoco intenta descargar el reporte, directamente no hace nada).
DAEMON="/usr/bin/java -- -Djava.awt.headless=true -Duser.language=es -Duser.country=AR -jar $RUTA_JASPER SERVLET_LOCAL:$PUERTO $NIVEL_LOG $ARCHIVO_LOG"