Continuous Integration with GWT 1.7 and Hudson

51 views
Skip to first unread message

Christian López Espínola <penyaskito>

unread,
Oct 28, 2009, 6:47:55 AM10/28/09
to Google Web Toolkit
Hi,

I'm trying to get CI working on my server. It's a Linux box with
JBoss, and no X server.
When trying to build I got errors when running GwtTests:

[INFO] org.eclipse.swt.SWTError: No more handles [gtk_init_check()
failed]
[INFO] at org.eclipse.swt.SWT.error(SWT.java:3400)
[INFO] at org.eclipse.swt.widgets.Display.createDisplay(Display.java:
793)
[INFO] at org.eclipse.swt.widgets.Display.create(Display.java:781)
[INFO] at org.eclipse.swt.graphics.Device.<init>(Device.java:145)
[INFO] at org.eclipse.swt.widgets.Display.<init>(Display.java:452)
[INFO] at org.eclipse.swt.widgets.Display.<init>(Display.java:443)
[INFO] at org.eclipse.swt.widgets.Display.getDefault(Display.java:
1522)
[INFO] at com.google.gwt.dev.SwtHostedModeBase.<init>
(SwtHostedModeBase.java:93)
[INFO] at com.google.gwt.dev.GWTShell.<init>(GWTShell.java:40)
[INFO] at com.google.gwt.junit.JUnitShell.<init>(JUnitShell.java:482)
[INFO] at com.google.gwt.junit.JUnitShell.getUnitTestShell
(JUnitShell.java:399)
[INFO] at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:
346)
[INFO] at com.google.gwt.junit.client.GWTTestCase.runTest
(GWTTestCase.java:219)
[INFO] at junit.framework.TestCase.runBare(TestCase.java:127)
[INFO] at junit.framework.TestResult$1.protect(TestResult.java:106)
[INFO] at junit.framework.TestResult.runProtected(TestResult.java:
124)
[INFO] at junit.framework.TestResult.run(TestResult.java:109)
[INFO] at junit.framework.TestCase.run(TestCase.java:118)
[INFO] at com.google.gwt.junit.client.GWTTestCase.run
(GWTTestCase.java:132)
[INFO] at junit.framework.TestSuite.runTest(TestSuite.java:208)
[INFO] at junit.framework.TestSuite.run(TestSuite.java:203)
[INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.doRun
(MavenTestRunner.java:105)
[INFO] at junit.textui.TestRunner.start(TestRunner.java:172)
[INFO] at org.codehaus.mojo.gwt.test.MavenTestRunner.main
(MavenTestRunner.java:63)

I tried with Xvbf, modifying $JBOSS_HOME/bin/run.sh, including the
following lines at the start of the file:

Xvfb :1 -ac -screen 0 1024x768x8 &
export DISPLAY=:1
JAVA_OPTS="$JAVA_OPTS -Djava.awt.headless=true"

But I'm still facing the same problem. Has anyone solved a similar
situation? Could you give me some advice?

Thanks in advance.

Sripathi Krishnan

unread,
Oct 28, 2009, 2:50:39 PM10/28/09
to google-we...@googlegroups.com
You are using Xvfb in the wrong place. Since hudson is going to start the browser, it needs the Xvfb argument. Jboss doesn't need those arguments.

Here is what we did to get Hudson working with gwt test cases

nohup Xvfb :4 -screen 0 1024x768x24 &
DISPLAY=:4 nohup java -jar hudson.war --httpPort=8999 --ajp13Port=8998 >>nohup.out &

--Sri


2009/10/28 Christian López Espínola <penyaskito> <penya...@gmail.com>

Christian López Espínola

unread,
Oct 29, 2009, 2:41:10 PM10/29/09
to google-we...@googlegroups.com
Hi Sripathi,

On Wed, Oct 28, 2009 at 7:50 PM, Sripathi Krishnan
<sripathi...@gmail.com> wrote:
> You are using Xvfb in the wrong place. Since hudson is going to start the
> browser, it needs the Xvfb argument. Jboss doesn't need those arguments.
>
> Here is what we did to get Hudson working with gwt test cases
>
> nohup Xvfb :4 -screen 0 1024x768x24 &
> DISPLAY=:4 nohup java -jar hudson.war --httpPort=8999 --ajp13Port=8998
>>>nohup.out &

Thanks for the comment. You're running hudson on its own server (I
guess jetty). I run Hudson on JBoss Application Server.
BTW, I solved the issue by redirecting the Xvfb output to any place,
avoiding other processes to kill it.

Xvfb :1 -ac -screen 0 1024x768x8 > /dev/null 2> /dev/null &

Hope this helps anyone else.
--
Cheers,

Christian López Espínola <penyaskito>
Reply all
Reply to author
Forward
0 new messages