Monday, December 5, 2011

How do I set GWT headless mode for Maven?

Hi,

I'm using Maven 3.0.3, GWT 2.4 and the Bamboo integration suite. How
do I set up my GWT tests to run in headless mode using Maven and GWT?
I have tried setting both these environment variables ...

JAVA_OPTS="-Djava.awt.headless=true"
MAVEN_OPTS="-Djava.awt.headless=true"

but to no avail. I still get the errors below ...

Caused by: java.lang.RuntimeException: Deferred binding failed for
'com.myco.clearing.product.client.resource.Resources$Images' (did you
forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
53)
at com.google.gwt.core.client.GWT.create(GWT.java:97)
at
com.myco.clearing.product.client.resource.Resources.<clinit>(Resources.java:
38)
... 41 more
Caused by: java.lang.Exception: java.lang.InternalError: Can't connect
to X11 window server using 'localhost:0.0' as the value of the DISPLAY
variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access
$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:
155)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:
131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:
68)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:
1135)
at
com.google.gwt.resources.rg.ImageBundleBuilder.toPng(ImageBundleBuilder.java:
538)
at
com.google.gwt.resources.rg.ImageResourceGenerator.reencodeToTempFile(ImageResourceGenerator.java:
641)
at
com.google.gwt.resources.rg.ImageResourceGenerator.prepare(ImageResourceGenerator.java:
567)
at
com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:
1043)
at
com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.initAndPrepare(AbstractClientBundleGenerator.java:
1069)
at
com.google.gwt.resources.rebind.context.AbstractClientBundleGenerator.generateIncrementally(AbstractClientBundleGenerator.java:
412)
at
com.google.gwt.dev.javac.StandardGeneratorContext.runGeneratorIncrementally(StandardGeneratorContext.java:
647)
at
com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:
41)
at com.google.gwt.dev.shell.StandardRebindOracle
$Rebinder.rebind(StandardRebindOracle.java:78)
at
com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:
268)
at
com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:
141)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:585)
at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
455)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
49)

Any ideas how and where I set the GWT headless mode for Maven-GWT? -
Dave

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment