3

I'm getting the following exception, after I've added SmartGWT to an existing GWT project:

onModuleLoad() threw an exception


Exception while loading module com.smartgwt.client.SmartGwtEntryPoint. See Development Mode for details.
java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
    at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError): Unable to get value of the property 'Browser': object is null or undefined
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
    at com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java)
    at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:239)
    ... 9 more

I've added the jar file to the build path, and also added the inherits node to the *.gwt.xml. What am I missing?

MichaelS
  • 7,023
  • 10
  • 51
  • 75
  • Please check any javascript function that is being called initially when your application is loaded. You might find the code in your *.gwt.xml file or *.html file or entry point class. – RAS Jan 03 '12 at 05:58

1 Answers1

1

I had this issue. I attempted many different fixes, but in the end it appears that there were some resources (JavaScript files and CSS files) which were not being loaded because of authentication issues (I was using Spring security and forgot to provide access to some subfolders of my web application).

There are some important processes you need to go through when troubleshooting GWT apps. They can cause issues even when there aren't really any.

It could also be an issue with Google Chrome (if that's what you're using). The guys at SmartGWT suggest you don't use Chrome for GWT development. http://forums.smartclient.com/showthread.php?t=8159#aChrome

jhsowter
  • 619
  • 3
  • 8