Iaroslav Karandashev
Iaroslav Karandashev

Reputation: 574

Why GXT exception occurs and how to fix it?

I am trying to create some simple GWT+GXT application.

I've created simple class MySampleApplication.java:

public class MySampleApplication implements EntryPoint {
    public void onModuleLoad() {
        AlertMessageBox d = new AlertMessageBox("title", "message");
        d.show();
    }
}

and simple declaration MySampleApplication.gwt.xml:

<inherits name='com.google.gwt.user.User'/>
<inherits name='com.sencha.gxt.ui.GXT'/>
<inherits name='com.google.gwt.user.theme.clean.Clean'/>
<stylesheet src="reset.css" />
<entry-point class='com.mySampleApplication.client.MySampleApplication'/>

It looks like there is nothing easier, but it fails:

onModuleLoad() threw an exception
Exception while loading module com.mySampleApplication.client.MySampleApplication.
See Development Mode for details.
java.lang.reflect.InvocationTargetException at    
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at   
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at   
java.lang.reflect.Method.invoke(Method.java:483) at   
com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:411) at 
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200) at 
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:526) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364) at   java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ExceptionInInitializerError at com.mySampleApplication.client.MySampleApplication.onModuleLoad(MySampleApplication.java:9) ... 9 more
Caused by:
java.lang.RuntimeException: Deferred binding failed for 
'com.sencha.gxt.widget.core.client.box.MessageBox$MessageBoxIcons'
(did you forget to inherit a required module?) at 
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at    
com.google.gwt.core.shared.GWT.create(GWT.java:72) at 
com.google.gwt.core.client.GWT.create(GWT.java:86) at 
com.sencha.gxt.widget.core.client.box.MessageBox.<clinit>(MessageBox.java:57) ... 10 more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:610) at 
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:470) at 
com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 13 more 

Upvotes: 0

Views: 231

Answers (1)

JPelletier
JPelletier

Reputation: 2109

Remove <inherits name='com.google.gwt.user.theme.clean.Clean'/> it's not supported by GXT, see Getting Started

Upvotes: 1

Related Questions