Java headless exception error when integrating java charting library

0
Hello, I have integrated a java charting library into my application which runs fine when I test it locally. It generates a chart and saves it as a png so that I can use it in a pdf template. However, when I push my application out into the cloud and I try to generate the charts, I receive a runtime error which states: No X11 DISPLAY variable was set, but this program performed an operation which requires it. It is a java headless exception. Has anyone had this similar issue or have any suggestions on how to remedy this? I’ve read some information about using X Servers to solve this issue, or downloading specific plugins. There seems to be a problem with the display, but the application is only saving the file as a png and not displaying it. Any suggestions or direction would be greatly appreciated. Also, where can I find out more information about the Mendix business server, I understand that Mendix Business server uses an integrated Jetty app server, but I would like to find out more information about it. Thank you.
asked
2 answers
0

Stackoverflow is most of the time the source of the answer :) http://stackoverflow.com/questions/5218870/getting-a-headlessexception-no-x11-display-variable-was-set

Regards,

Ronald

answered
0

It looks like your library was meant to be run clientside, ie as a desktop application. However, the runtime normally functions as a server, ie runs on a server in the cloud. There's no display (X11) there, so nothing to open the GUI in. I expect that to be the root of your problem.

Perhaps you can find a different library that doesn't require a GUI, or run the library without it?

answered