我最近在项目中将GWT SDK从1.5.3更新到2.0.0.我设法解决了所有问题但只有一个问题.
我无法使用chrome的开发模式.我的应用程序的登录页面加载完美,但当我尝试登录(即生成RPC)时,我收到以下错误:
com.google.gwt.core.client.JavaScriptException: (Error): Error calling method on NPObject!
stack: Error: Error calling method on NPObject!
at eval at eval (native v8natives.js:132:1)
at unknown source
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.0 (eval at eval (native v8natives.js:132:1))
at Object. (unknown source)
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.1 (eval at eval (native v8natives.js:132:1))
at Object. (unknown source)
at __gwt_jsInvoke (http://grapple:8087/hosted.html:70:35)
at Array.1 (eval at eval (native v8natives.js:132:1))
__gwt_ObjectId: 2835
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.google.gwt.user.client.rpc.impl.SerializerBase$MethodMap$.deserialize$(SerializerBase.java)
at com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:124)
at com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:116)
at com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:61)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter$ResponseReader$8.read(RequestCallbackAdapter.java:104)
at com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:197)
at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:396)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:188)
at sun.reflect.GeneratedMethodAccessor231.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
我使用的是Chrome 4.0.295.0和Developer plugin 1.0.7263.
开发模式在FF和IE上运行良好.
你知道发生了什么吗?
谢谢.
我不确定这是开发人员插件中的错误 - 它可能是浏览器的限制.
随着应用程序变得越来越复杂,最终将达到浏览器的堆栈大小限制.某些浏览器的限制比其他浏览器更高(请参阅各种浏览器中的http://tests.novemberborn.net/javascript/callstack-size.html).据我所知,Safari是最高的,并且有一个官方的GWT开发人员插件 - 至少在Mac平台上.
插件(在所有平台上)为堆栈增加了相当大的开销(这就是为什么这个问题通常会在生产中消失)所以如果你想继续在调试模式下开发你的应用程序,最好的建议可能就是重构你的代码.您可能正在尝试同时处理客户端上过多的数据.