Caused by: java.lang.InternalError: Can't connect to X11 window server using 'host:10.0' as the value of the DISPLAY variable

Viewed 215

I'm struggling with an issue with X11 when running a build in TeamCity, the TC agent has X11 installed and when I'm logging in the user executing the build run it works for 1 time else I always get that error:

Caused by: java.lang.InternalError: Can't connect to X11 window server using 'host:10.0' as the value of the DISPLAY variable.

I've tried many solutions found on the web (like export display, using xvfb, or changing java version) that could have solved but none worked and I barely understand why it does work 1 time when I log in the TC user.

I also get a null pointer exception at the end of the run and wonder if both errors are related.

Edit: I forgot to mention that the plugin used is maven-plugin 1.4 and that we have an old Ubuntu14 box that does work on which I copied the files from

15:54:35
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
15:54:35
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
15:54:35
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
15:54:35
      at java.lang.reflect.Method.invoke(Method.java:606)
15:54:35
      at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
15:54:35
      at java.lang.Thread.run(Thread.java:745)
15:54:35
    Caused by: java.lang.InternalError: Can't connect to X11 window server using 'host:10.0' as the value of the DISPLAY variable.
15:54:35
      at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
15:54:35
      at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
15:54:35
      at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
15:54:35
      at java.security.AccessController.doPrivileged(Native Method)
15:54:35
      at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
15:54:35
      at java.lang.Class.forName0(Native Method)
15:54:35
      at java.lang.Class.forName(Class.java:195)
15:54:35
      at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
15:54:35
      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
15:54:35
      at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1182)
15:54:35
      at org.apache.batik.ext.awt.image.GraphicsUtil.createGraphics(Unknown Source)
15:54:35
      at org.apache.batik.gvt.filter.GraphicsNodeRed8Bit.genRect(Unknown Source)


  Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (generate-theme) on project (project): An exception occured while executing the Java class. null

I really do need some help, please!!!

0 Answers
Related