PDA

View Full Version : Missing module running sample



brock.haywood
16 Jul 2009, 3:20 PM
Hello,

I seem to have hit a snag trying to get some of the sameple code to run. I'm currently running eclipse 3.4.2, GWT 1.6.4, and GXT 2.x. The problem that i am having is when i instantiate the FormsExample from the sample code and run it, i get a GWT error about deferred binding failing for 'com.extjs.gxt.ui.client.image.XImages'.

I believe that i have followed the install instructions pretty closely. The gxt.jar is in my build and classpath. The gxt-all.css is being included, i have also inherited GXT in my module definitetion. Can anyone suggest what might the problem be?

Thanks very much,

bh

ps: Here is the java exception:

[ERROR] Unable to load module entry point class com.bclc.gxtdemo.client.GxtSample (see associated exception for details)
java.lang.RuntimeException: Deferred binding failed for 'com.extjs.gxt.ui.client.image.XImages' (did you forget to inherit a required module?)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:43)
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:34)
at com.extjs.gxt.ui.client.widget.Component.<clinit>(Component.java:199)
at com.bclc.gxtdemo.client.GxtSample.onModuleLoad(GxtSample.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:343)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:77)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:161)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
Caused by: java.lang.NoSuchMethodError: calculateSecurityWarningPosition
at java.awt.Window.initIDs(Native Method)
at java.awt.Window.<clinit>(Window.java:286)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:25)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:122)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:918)
at java.lang.reflect.Field.getFieldAccessor(Field.java:899)
at java.lang.reflect.Field.get(Field.java:358)
at sun.awt.SunToolkit$6.run(SunToolkit.java:1315)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.SunToolkit.<clinit>(SunToolkit.java:1309)
at sun.awt.Win32GraphicsEnvironment.<clinit>(Win32GraphicsEnvironment.java:49)
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.user.rebind.ui.ImageBundleBuilder.drawBundledImage(ImageBundleBuilder.java:450)
at com.google.gwt.user.rebind.ui.ImageBundleBuilder.writeBundledImage(ImageBundleBuilder.java:319)
at com.google.gwt.user.rebind.ui.ImageBundleGenerator.generateImplClass(ImageBundleGenerator.java:305)
at com.google.gwt.user.rebind.ui.ImageBundleGenerator.generate(ImageBundleGenerator.java:159)
at com.google.gwt.dev.cfg.RuleGenerateWith.realize(RuleGenerateWith.java:49)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.tryRebind(StandardRebindOracle.java:113)
at com.google.gwt.dev.shell.StandardRebindOracle$Rebinder.rebind(StandardRebindOracle.java:62)
at com.google.gwt.dev.shell.StandardRebindOracle.rebind(StandardRebindOracle.java:172)
at com.google.gwt.dev.shell.ShellModuleSpaceHost.rebind(ShellModuleSpaceHost.java:114)
at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:474)
at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:365)
at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:39)
at com.google.gwt.core.client.GWT.create(GWT.java:91)
at com.extjs.gxt.ui.client.GXT.<clinit>(GXT.java:34)
at com.extjs.gxt.ui.client.widget.Component.<clinit>(Component.java:199)
at com.bclc.gxtdemo.client.GxtSample.onModuleLoad(GxtSample.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:326)
at com.google.gwt.dev.shell.BrowserWidget.attachModuleSpace(BrowserWidget.java:343)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6.access$300(BrowserWidgetIE6.java:37)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.gwtOnLoad(BrowserWidgetIE6.java:77)
at com.google.gwt.dev.shell.ie.BrowserWidgetIE6$External.invoke(BrowserWidgetIE6.java:161)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)

brock.haywood
17 Jul 2009, 7:43 AM
in the same environment, i'm still getting the same error with the following code:

public void onModuleLoad()
{
Window w = new Window();

w.setSize(500, 300);
w.setHeading("huzzah");
w.setPlain(true);
w.show();
RootPanel.get().add(w);
}

my module xml contains:

<inherits name='com.extjs.gxt.ui.GXT'/>

and my host page contains the link to the css:

<link rel="stylesheet" type="text/css" href="resources/css/gxt-all.css" />

I must be missing something about setting up these projects but i can't seem to figure out what it could be.

Any ideas?

brock.haywood
17 Jul 2009, 7:49 AM
A little further info, this only seems to happen in the gwt hosted mode browser. When i compile the project and run in firefox & ie7, it works ok but still fails in the hosted mode browser.

brock.haywood
17 Jul 2009, 9:27 AM
This also occurs in GWT 1.7.0.

brock.haywood
17 Jul 2009, 1:00 PM
The problem was a configuration problem. The problem was that in eclipse my compliance level was set to 1.5 but the jre that was running the code was 1.6. This seems to have caused some issues initializing the Win32GraphicsEnvironment for hosted mode.