RE: JVM Startup option required for Liferay 6.1 (JBoss) to avoid X11 Errors

Josmel Duran, modified 5 Years ago. New Member Post: 1 Join Date: 5/27/20 Recent Posts
Hi Community
I am seeing below error which seems to be harmless to my Portal, but I want to understand why it is happening and fix it.
Liferay Portal 6.1.3  --- Java version "1.7.0_40" --- JBoss E AP -  6.0.1 GA.
My JVM options already include  -Djava.awt.headless=true
Any recommendation?​​​​​​​

09:29:59,762 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
09:29:59,762 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997)     at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
09:29:59,763 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997)     at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
09:29:59,763 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997)     at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
09:29:59,764 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997)     at java.security.AccessController.doPrivileged(Native Method)
09:29:59,764 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
09:29:59,765 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.lang.Class.forName0(Native Method)
09:29:59,765 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.lang.Class.forName(Class.java:195)
09:29:59,766 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
09:29:59,766 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
09:29:59,766 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)
09:29:59,767 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1172)
09:29:59,767 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at org.apache.pdfbox.pdmodel.PDPage.convertToImage(PDPage.java:754)
09:29:59,768 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at com.liferay.portlet.documentlibrary.util.LiferayPDFBoxConverter._generateImagesPB(LiferayPDFBoxConverter.java:92)
09:29:59,768 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at com.liferay.portlet.documentlibrary.util.LiferayPDFBoxConverter.generateImagesPB(LiferayPDFBoxConverter.java:70)
09:29:59,769 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl$LiferayPDFBoxProcessCallable.call(PDFProcessorImpl.java:891)
09:29:59,769 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at com.liferay.portlet.documentlibrary.util.PDFProcessorImpl$LiferayPDFBoxProcessCallable.call(PDFProcessorImpl.java:1)
09:29:59,770 ERROR [stderr] (com.liferay.portal.kernel.process.ProcessExecutor-997) &nbsp; &nbsp; at com.liferay.portal.kernel.process.ProcessExecutor.main(ProcessExecutor.java:148)
</clinit>
thumbnail
David H Nebinger, modified 5 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Configure for imagemagick and ghostscript. PDFBox is being invoked to handle PDF conversion and, being java-based, it needs to fire up some java imaging magic.  Enabling imagemagick and ghostcript may offload that to native Linux apps.
thumbnail
Olaf Kock, modified 5 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts
Josmel Duran:

Hi Community
I am seeing below error which seems to be harmless to my Portal, but I want to understand why it is happening and fix it.
Liferay Portal 6.1.3  --- Java version "1.7.0_40" --- JBoss E AP -  6.0.1 GA.
My JVM options already include  -Djava.awt.headless=true
Any recommendation?
Not what you want to hear: What's harmful to your portal is that it's hopelessly out of date. Assuming it's 6.1.2 GA3 (as there was no 6.1.3), the release date was Dec 2013 and I'm not aware of any significant update since then.
And there are other components from the same era.
I'd not be surprised if it was also vulnerable to the recently found security issues. But even the 6.1 Enterprise Edition has reached its end of life by now.
My recommendation is to fix it by upgrading to the current release.