java.lang.reflect.InvocationTargetException - Apache POI & Jfree jars issue

Hi Folks,

We are using the Apache POI and Jfree chart jars to generate the excel.JARs are kept under package level static folder.

Often below error is occurring. Can anyone explain me the root cause?

java.lang.reflect.InvocationTargetException:Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable

IS version : . Fix : IS_9.7_Core_Fix1

Mohan Nataraj

When do you get this error?

Make sure X11 or XMing is running and set the DISPLAY value.

Are you trying install some thing or running a UI on unix/putty command console?

If yes please follow as Mahesh advised above!



you can try to add the property “-Djava.awt.headless=true” to either JAVA_OPTIONS in or add a property line to the custom_wrapper.conf file to the list.

This will suppress any graphical output when running in console only mode.


1 Like

In addition to above, make sure you reboot the IS at-least once.

1 Like

I can’t predict when this error happens. A restart would solve this issue temporarily when it happens.

I found out that java service which creates the excel using the AWT class which can cause this issue.

As Holger suggests, config change would fix the issue. I could not find, why java service is failing sometimes. It should fail every time, right?

I am not installing or running the UI on a console. UI would call IS REST service(post) which calls the Java service to create the excel stream and sends to UI to download.

sends to UI to download → I think this is where it is failing and the error throwing about X11 output error to the console…

Which OS is the IS running on?

Have you update the config file as suggested above and retry?


Adding the “-Djava.awt.headless=true” to profile config file fixed the issue. Thanks for the input guys.