2012-01-02 46 views
3

我得到以下異常,我已經添加SmartGWT的後到現有的GWT項目:SmartGWT的onModuleLoad()拋出一個異常

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 

我已經添加了jar文件添加到構建路徑,還將繼承節點添加到*.gwt.xml。我錯過了什麼?

+0

請檢查當應用程序被加載正被最初稱任何JavaScript函數。您可能會在* .gwt.xml文件或* .html文件或入口點類中找到代碼。 – RAS 2012-01-03 05:58:50

回答

1

我有這個問題。我嘗試很多不同的解決方法,但最終似乎有一些資源(JavaScript文件和CSS文件),它並沒有被加載,因爲身份認證的問題(我用的是春天的安全性和忘記提供訪問我的網站的一些子文件夾應用)。

有你疑難解答GWT應用程序時,需要經過一些重要的過程。即使沒有真正的問題,它們也會引發問題。

它也可能是與谷歌瀏覽器的問題(如果這就是你正在使用)。 SmartGWT的人建議你不要使用Chrome進行GWT開發。 http://forums.smartclient.com/showthread.php?t=8159#aChrome