Forum Discussion

pwillworth's avatar
pwillworth
Occasional Contributor
11 years ago

testrunner.sh trying to find a DISPLAY

I am trying to migrate from SoapUI 4.5.1 to 5.1.1 in a Red Had Linux environment so our new license files will work, and encountering a problem.

When I run the same headless testrunner.sh command I used to:
/opt/SoapUI-Pro-5.1.1/bin/testrunner.sh -r -j -f/IBM/cruise/builds/CSvcBilling-WSP/testresults/soapui/CSvcBilling -Pdphost=dpbuild01 -PHermesConfigPath=/opt/SoapUI-Pro-5.1.1/hermesJMS/cfg test/soapui/CSvcBillingServiceV2-soapui-project.xml

I get an error and the process just hangs there:
================================
=
= SOAPUI_HOME = /opt/SoapUI-Pro-5.1.1
=
================================
SoapUI Pro 5.1.1 TestCase Runner
Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
at java.awt.GraphicsEnvironment.checkHeadless(Unknown Source)
at java.awt.Window.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at java.awt.Frame.<init>(Unknown Source)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(Unknown Source)
at javax.swing.SwingUtilities.getSharedOwnerFrame(Unknown Source)
at javax.swing.JOptionPane.getRootFrame(Unknown Source)
at javax.swing.JOptionPane.getFrameForComponent(Unknown Source)
at com.jp.protection.gui.dialogs.LicenseErrorDialog.<init>(LicenseErrorDialog.java:49)
at com.jp.protection.gui.dialogs.DefaultLicenseAdapter.<init>(DefaultLicenseAdapter.java:56)
at com.jp.protection.pub.launch.ProtectionLauncher.initLicenseListener(ProtectionLauncher.java:128)
at com.jp.protection.pub.launch.HeadlessProtectionLauncher.init(HeadlessProtectionLauncher.java:189)
at com.jp.protection.pub.launch.ProtectionLauncher.init(ProtectionLauncher.java:113)
at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.a(SourceFile:235)
at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.<init>(SourceFile:73)
at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.<init>(SourceFile:61)
at com.eviware.soapui.impl.protection.ProtectionLicense.checkLicenseExpired(SourceFile:169)
at com.eviware.soapui.LicenseHandling.a(SourceFile:88)
at com.eviware.soapui.SoapUIProTestCaseRunner.init(SourceFile:67)
at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:62)


If I set up X-forwarding and a DISPLAY variable for it, everything runs fine, but no window comes up. I have already opened up SoapUI earlier and applied my new license file.

Is there some way to avoid this error so I can run my test suites unattended in a headless environment like I have been doing?
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hello,

    Unfortunately we only have workarounds for this, if you have X component you can specify: "export DISPLAY=:0.0" before starting application and this should also work. We currently have a defect logged in our defect tracker with SOAP-2705 reference number.

    Regards,
    Temil
  • pwillworth's avatar
    pwillworth
    Occasional Contributor
    Thanks, unfortunately that leads to another error. Is there more to the workaround?

    ================================
    SoapUI Pro 5.1.1 TestCase Runner
    Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.access$200(Unknown Source)
    at sun.awt.X11GraphicsEnvironment$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at java.awt.GraphicsEnvironment.createGE(Unknown Source)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(Unknown Source)
    at java.awt.Window.initGC(Unknown Source)
    at java.awt.Window.init(Unknown Source)
    at java.awt.Window.<init>(Unknown Source)
    at java.awt.Frame.<init>(Unknown Source)
    at java.awt.Frame.<init>(Unknown Source)
    at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(Unknown Source)
    at javax.swing.SwingUtilities.getSharedOwnerFrame(Unknown Source)
    at javax.swing.JOptionPane.getRootFrame(Unknown Source)
    at javax.swing.JOptionPane.getFrameForComponent(Unknown Source)
    at com.jp.protection.gui.dialogs.LicenseErrorDialog.<init>(LicenseErrorDialog.java:49)
    at com.jp.protection.gui.dialogs.DefaultLicenseAdapter.<init>(DefaultLicenseAdapter.java:56)
    at com.jp.protection.pub.launch.ProtectionLauncher.initLicenseListener(ProtectionLauncher.java:128)
    at com.jp.protection.pub.launch.HeadlessProtectionLauncher.init(HeadlessProtectionLauncher.java:189)
    at com.jp.protection.pub.launch.ProtectionLauncher.init(ProtectionLauncher.java:113)
    at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.a(SourceFile:235)
    at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.<init>(SourceFile:73)
    at com.eviware.soapui.impl.protection.SoapuiProtectionSupport.<init>(SourceFile:61)
    at com.eviware.soapui.impl.protection.ProtectionLicense.checkLicenseExpired(SourceFile:169)
    at com.eviware.soapui.LicenseHandling.a(SourceFile:88)
    at com.eviware.soapui.SoapUIProTestCaseRunner.init(SourceFile:67)
    at com.eviware.soapui.SoapUIProTestCaseRunner.main(SourceFile:62)
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    You can continue using SoapUI Pro 5.0.0. Till we add a workaround.

    Thanks,
    Jeshtha
    • nk-omn's avatar
      nk-omn
      New Member

      Hello, 

       

      any updates on this issue? 

       

      We are running automated tests on a headless server and cannot install any x libraries, or displays.

      It shouldn't be necessary for the shell script to need the screen size?!

       

      When adding "-Djava.awt.headless=true" as argument to the provided shell script, the X11 error is gone, but another error regarding screen size appears:

       

      SoapUI 5.2.1 TestCase Runner
      java.awt.HeadlessException
      at sun.awt.HeadlessToolkit.getScreenSize(HeadlessToolkit.java:284)
      at com.eviware.soapui.analytics.providers.BaseAnalyticsProvider.getStrScreenSize(BaseAnalyticsProvider.java:48)
      at com.eviware.soapui.analytics.providers.GoogleAnalyticsProvider.getEventLabel(GoogleAnalyticsProvider.java:165)
      at com.eviware.soapui.analytics.providers.GoogleAnalyticsProvider.buildParametersString(GoogleAnalyticsProvider.java:73)
      at com.eviware.soapui.analytics.providers.GoogleAnalyticsProvider.trackAction(GoogleAnalyticsProvider.java:48)
      at com.eviware.soapui.analytics.AnalyticsManager$3.run(AnalyticsManager.java:167)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

       

      Is this still not fixed, 3 years, one minor version and who knows how many patch versions later?

      Please don't disregard this issue! Thanks a lot!

      • SKVTommy's avatar
        SKVTommy
        Regular Visitor

        We solved this by running the shell command "unset DISPLAY"