Ok, so just in case anyone out there has this problem, there is a super easy fix that does involve updating libs or installing X11 etc.

So the problem is using any lib that access’s java.awt.*, running on a headless unix box (linux in my case), you get the following error: “java.lang.InternalError: Can’t connect to X11 window server using ‘:0.0′ as the value of the DISPLAY variable.” Subsequent reloads of the page result in exception “java.lang.NoClassDefFoundError”.

To fix this, all you have to do is add the following command to your httpd startup script:

-Djava.awt.headless=true

A lot of the sites I came across suggested annoying work-arounds (lib updates, installations), but this fixes the problem at the root.