2012-01-02 4 views
3

Je reçois l'exception suivante, après que je l'ai ajouté SmartGWT à un projet GWT existant:SmartGWT onModuleLoad() a lancé une exception

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 

J'ai ajouté le fichier jar sur le chemin de la construction, et a également ajouté le nœud hérités au *.gwt.xml. Qu'est-ce que je rate?

+0

Veuillez vérifier toute fonction javascript qui est appelée initialement lorsque votre application est chargée. Vous pouvez trouver le code dans votre fichier * .gwt.xml ou votre fichier * .html ou votre classe de points d'entrée. – RAS

Répondre

1

J'ai eu ce problème. J'ai essayé plusieurs correctifs différents, mais à la fin, il semble que certaines ressources (fichiers JavaScript et fichiers CSS) n'étaient pas chargées en raison de problèmes d'authentification (j'utilisais Spring security et j'oubliais de donner accès à certains sous-dossiers de mon site application).

Il existe certains processus importants que vous devez suivre lors du dépannage des applications GWT. Ils peuvent causer des problèmes même quand il n'y en a pas vraiment.

Il pourrait également être un problème avec Google Chrome (si c'est ce que vous utilisez-vous). Les gars de SmartGWT vous suggèrent de ne pas utiliser Chrome pour le développement de GWT. http://forums.smartclient.com/showthread.php?t=8159#aChrome

Questions connexes