Question

I am new to gwt and gwtext.I am doing BasicGrid Example by following the GWT EXT Demo

I am getting the below Exception

onModuleLoad() threw an exception

Exception while loading module com.csscorp.client.BasicGridExample. See Development   Mode for details.
java.lang.reflect.InvocationTargetException at             
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at  
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)   
at java.lang.reflect.Method.invoke(Method.java:606) at     com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:406) 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:744) Caused by: java.lang.ExceptionInInitializerError at com.csscorp.client.BasicGridExample.onModuleLoad(BasicGridExample.java:29) ... 9 more Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.gwtext.client.widgets.Component::checkExtVer()([]): $wnd.Ext is undefined at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249) at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136) at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571) at com.google.gwt.dev.shell.ModuleSpace.invokeNativeBoolean(ModuleSpace.java:194) at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeBoolean(JavaScriptHost.java:35) at com.gwtext.client.widgets.Component.checkExtVer(Component.java) at com.gwtext.client.widgets.Component.(Component.java:108) ... 10 more

Please guide me how to reslove this

Was it helpful?

Solution

Same problem has been discussed at Setting-up GWT-Ext for GWT 1.6 with Eclipse and has been resolved.

Please have a look.

Steps to fix the issue.

  • Create a js directory in the war directory of the project.
  • Download ext-2.0.2.zip, unpack it and copy the contents to the js directory as shown in below snapshot.
  • In the project's gwt.xml file add below lines:

    <inherits name='com.google.gwt.user.User'/>
    <inherits name='com.gwtext.GwtExt' />
    ...
    <entry-point class='com.x.y.z.client.EntryPointClass'/>
    <stylesheet src="../js/ext-2.0.2/resources/css/ext-all.css" />
    <script src="../js/ext-2.0.2/adapter/ext/ext-base.js" />
    <script src="../js/ext-2.0.2/ext-all.js" />
    

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top