javaunixtibco

Error while executing buildear in UNIX


The buildear command is as follows :

    buildear -s -x /Archive/My_App.archive -o /app/Script_Sql/Jen_Workspace/My_App.ear -p /app/Script_Sql/Jen_Workspace/My_App

The EAR is getting created but i am getting below error :

    Caused by: java.awt.HeadlessException:
    No X11 DISPLAY variable was set, but this program performed an operation which requires it.
    at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:261)
    at com.extensibility.rock.l.doGetWorkArea(Platform.java:197)
    at com.extensibility.rock.l.a(Platform.java:193)
    at com.extensibility.rock.u.<clinit>(Screen.java:52)

I did read about Java's "headless" installation capabilty wherein it allows installation without GUI/AWT libraries (please correct me if I am wrong). I tried setting the value of DISPLAY (export DISPLAY=localhost:0.0) but didn't work. Please suggest any solution for this. FYI - I don't have root or sudo privileges on the UNIX server.


Solution

  • The buildear utility requires an X server to be executed.

    To work around this, try adding java.property.java.awt.headless=true in the bwengine.tra. If it doesn't do the trick, you might want to ask your sys admin to install and configure Xvfb, a virtual X server.