← Back to team overview

sikuli-driver team mailing list archive

[Bug 1441173] Re: Sikuli is throwing exception org.sikuli.api.robot.desktop.DesktopScreen.getSize

 

The server environment does not have a real screen, at least Java is not
detecting one.

Caused by: java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.

BTW: the package you are using is not supported here.
https://code.google.com/p/sikuli-api/

** Summary changed:

- Sikuli is throwing exception org.sikuli.api.robot.desktop.DesktopScreen.getSize
+ [Sikuli Java API] is throwing exception org.sikuli.api.robot.desktop.DesktopScreen.getSize  --- headless not supported

** Changed in: sikuli
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1441173

Title:
  [Sikuli Java API] is throwing exception
  org.sikuli.api.robot.desktop.DesktopScreen.getSize  --- headless not
  supported

Status in Sikuli:
  Invalid

Bug description:
  When I run my code, I am getting below error. I am running my code on
  remote server using Selenium grid. Though when I run on my local
  machine code is working fine.

  error is -----------

  java.lang.ExceptionInInitializerError
  	at org.sikuli.api.robot.desktop.DesktopScreen.getSize(DesktopScreen.java:43)
  	at org.sikuli.api.AbstractScreenRegion.<init>(AbstractScreenRegion.java:19)
  	at org.sikuli.api.DefaultScreenRegion.<init>(DefaultScreenRegion.java:37)
  	at org.sikuli.api.DesktopScreenRegion.<init>(DesktopScreenRegion.java:11)
  	at com.test.accenture.acp.onboardoperation.OnboardingOperationScenario.I_click_on_Choose_file(OnboardingOperationScenario.java:3596)
  	at ✽.Then I click on Choose file(com/test/accenture/acp/onboardoperation/0002CreateBlueprint.feature:19)
  Caused by: java.awt.HeadlessException: 
  No X11 DISPLAY variable was set, but this program performed an operation which requires it.
  	at sun.java2d.HeadlessGraphicsEnvironment.getScreenDevices(HeadlessGraphicsEnvironment.java:72)
  	at org.sikuli.api.robot.desktop.AWTDesktop.<clinit>(AWTDesktop.java:27)
  	at org.sikuli.api.robot.desktop.DesktopScreen.getSize(DesktopScreen.java:43)
  	at org.sikuli.api.AbstractScreenRegion.<init>(AbstractScreenRegion.java:19)
  	at org.sikuli.api.DefaultScreenRegion.<init>(DefaultScreenRegion.java:37)
  	at org.sikuli.api.DesktopScreenRegion.<init>(DesktopScreenRegion.java:11)
  	at com.test.accenture.acp.onboardoperation.OnboardingOperationScenario.I_click_on_Choose_file(OnboardingOperationScenario.java:3596)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:606)
  	at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:37)
  	at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:44)
  	at cucumber.runtime.Runtime.runStep(Runtime.java:223)
  	at cucumber.runtime.model.StepContainer.runStep(StepContainer.java:44)
  	at cucumber.runtime.model.StepContainer.runSteps(StepContainer.java:39)
  	at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:36)
  	at cucumber.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:76)
  	at cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:65)
  	at cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:20)
  	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  	at cucumber.junit.FeatureRunner.run(FeatureRunner.java:72)
  	at cucumber.junit.Cucumber.runChild(Cucumber.java:75)
  	at cucumber.junit.Cucumber.runChild(Cucumber.java:36)
  	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
  	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
  	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
  	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
  	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
  	at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
  	at cucumber.junit.Cucumber.run(Cucumber.java:80)
  	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
  	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
  	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:606)
  	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
  	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
  	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
  	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
  	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)

  System

  Windows server R2 datacenter / 64 bit operating system
  sikuli 1.0.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1441173/+subscriptions


References