Para Desenvolvedores

Tranformação de Arquivos não funciona após Upgrade

Resolvido

No log full do Lumis sai o seguinte stacktrace

lumis.portal.file.transformation.DefaultFileTransformer - An Error occurred during the file transformation 'scaling_image_lg' of the file 8ABAB4E069073A7D016907CEB9FC72CD

 

java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

apareceu o erro abaixo no logfull do Lumis. Esse erro não aconteceu no ambiente do TRG.

 

2019-02-19 19:09:47,467 ERROR      [QueueProcessor 5 - 8ABAB4E069073A7D016907CEBB3272D0] lumis.portal.file.transformation.DefaultFileTransformer - An Error occurred during the file transformation 'scaling_image_lg' of the file 8ABAB4E069073A7D016907CEB9FC72CD

java.awt.AWTError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.

        at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)

        at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)

        at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:115)

        at java.security.AccessController.doPrivileged(Native Method)

        at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:264)

        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)

        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)

        at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)

        at lumis.portal.file.transformation.ImageTransformation.getScaledInstance(ImageTransformation.java:164)

        at lumis.portal.file.transformation.ImageTransformation.transform(ImageTransformation.java:85)

        at lumis.portal.file.transformation.DefaultFileTransformer.transform(DefaultFileTransformer.java:82)

        at lumis.portal.file.transformation.FileTransformationManager.transformFile(FileTransformationManager.java:347)

        at lumis.portal.file.transformation.TransformationTask.run(TransformationTask.java:66)

        at lumis.portal.processqueue.QueueProcessor.run(QueueProcessor.java:61)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:748)

2019-02-19 19:09:48,428 ERROR      [QueueProcessor 5 - 8ABAB4E069073A7D016907CEBB3272D0] lumis.portal.file.transformation.DefaultFileTransformer - An Error occurred during the file transformation 'scaling_image_md' of the file 8ABAB4E069073A7D016907CEB9FC72CD

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:264)

        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)

        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)

        at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)

        at lumis.portal.file.transformation.ImageTransformation.getScaledInstance(ImageTransformation.java:164)

        at lumis.portal.file.transformation.ImageTransformation.transform(ImageTransformation.java:85)

        at lumis.portal.file.transformation.DefaultFileTransformer.transform(DefaultFileTransformer.java:82)

        at lumis.portal.file.transformation.FileTransformationManager.transformFile(FileTransformationManager.java:347)

        at lumis.portal.file.transformation.TransformationTask.run(TransformationTask.java:66)

        at lumis.portal.processqueue.QueueProcessor.run(QueueProcessor.java:61)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:748)

2019-02-19 19:09:48,977 ERROR      [QueueProcessor 5 - 8ABAB4E069073A7D016907CEBB3272D0] lumis.portal.file.transformation.DefaultFileTransformer - An Error occurred during the file transformation 'scaling_image_sm' of the file 8ABAB4E069073A7D016907CEB9FC72CD

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

        at java.lang.Class.forName0(Native Method)

        at java.lang.Class.forName(Class.java:264)

        at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:103)

        at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:82)

        at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1181)

        at lumis.portal.file.transformation.ImageTransformation.getScaledInstance(ImageTransformation.java:164)

        at lumis.portal.file.transformation.ImageTransformation.transform(ImageTransformation.java:85)

        at lumis.portal.file.transformation.DefaultFileTransformer.transform(DefaultFileTransformer.java:82)

        at lumis.portal.file.transformation.FileTransformationManager.transformFile(FileTransformationManager.java:347)

        at lumis.portal.file.transformation.TransformationTask.run(TransformationTask.java:66)

        at lumis.portal.processqueue.QueueProcessor.run(QueueProcessor.java:61)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

        at java.lang.Thread.run(Thread.java:748)

Relacionado a

https://lumisxp.lumis.com.br/para-desenvolvedores/forum/meu-javamelody-nao-esta-gerando-graficos.htm

Por Edson Mattos

Em 24/02/19 11:29

Acompanhar pergunta

1 resposta(s):

Ordenar por:

Para solucionar o problema, adicione aos parâmetros de inicialização do servidor de aplicação, o parâmetro abaixo

-Djava.awt.headless=true

Exemplo para o Tomcat (presente no arquivo catalina.sh ou setenv.sh)

JAVA_OPTS="-Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:NewRatio=1 -Dfile.encoding=UTF8 -Djava.awt.headless=true"

Por Edson Mattos

Em 24/02/19 11:31

Entrar

Interaja com a comunidade e tenha acesso a conteúdos exclusivos.

Houve algum erro ao acessar o banco de dados. Tente novamente mais tarde.