GWT 2.5编译错误

时间:2013-01-23 11:37:04

标签: gwt

如果客户端代码更改,我们可以刷新页面以重新编译它并查看结果。它适用于GWT 2.4

自GWT 2.5起,存在问题。页面刷新后会抛出com.google.gwt.user.client.rpc.SerializationException。 如果我重新启动Web应用程序并刷新页面一切正常。所以它似乎是GWT中的一些错误。

一些细节:

  1. 如果有任何更改,则抛出此异常,例如css file(!)
  2. 经常抛出此异常,但并非总是如此,有时可以。
  3. 实际例外可能涉及几乎所有课程。在这个例子中,它是java.lang.Integer。
  4.   

    com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:The   响应无法反序列化   com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:221)     在   com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)     在   com.google.gwt.http.client.RequestBuilder $ 1.onReadyStateChange(RequestBuilder.java:395)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)at   sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)at   java.lang.reflect.Method.invoke(未知来源)at   com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)     在   com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)     在   com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)     在   com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)     在   com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)     在   com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)     在   com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)     在   com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)     在   com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)     在com.google.gwt.core.client.impl.Impl.apply(Impl.java)at   com.google.gwt.core.client.impl.Impl.entry0(Impl.java:242)at at   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at   sun.reflect.NativeMethodAccessorImpl.invoke(未知来源)at   sun.reflect.DelegatingMethodAccessorImpl.invoke(未知来源)at   java.lang.reflect.Method.invoke(未知来源)at   com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)     在   com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)     在   com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)     在   com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:293)     在   com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:547)     在   com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:364)     在java.lang.Thread.run(未知来源)引起:   com.google.gwt.user.client.rpc.SerializationException:   java.lang.RuntimeException:无法找到类   com.google.gwt.user.client.rpc.core.java.lang.Integer_FieldSerializer     在   com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:164)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate(SerializerBase.java:114)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:396)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   ru.minogin.data.shared.model.BaseEntity_FieldSerializer.deserialize(BaseEntity_FieldSerializer.java:29)     在   ru.minogin.data.shared.model.OrderedEntity_FieldSerializer.deserialize(OrderedEntity_FieldSerializer.java:22)     在   ru.pickbook.shared.model.Format_FieldSerializer.deserialize(Format_FieldSerializer.java:133)     在   ru.pickbook.shared.model.Format_FieldSerializer.deserial(Format_FieldSerializer.java:163)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   ru.pickbook.shared.model.Album_FieldSerializer.deserialize(Album_FieldSerializer.java:105)     在   ru.pickbook.shared.model.Album_FieldSerializer.deserial(Album_FieldSerializer.java:141)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   ru.pickbook.shared.model.OrderItem_FieldSerializer.deserialize(OrderItem_FieldSerializer.java:48)     在   ru.pickbook.shared.model.OrderItem_FieldSerializer.deserial(OrderItem_FieldSerializer.java:75)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.deserialize(Collection_CustomFieldSerializerBase.java:34)     在   com.google.gwt.user.client.rpc.core.java.util.HashSet_CustomFieldSerializer.deserialize(HashSet_CustomFieldSerializer.java:34)     在   com.google.gwt.user.client.rpc.core.java.util.HashSet_FieldSerializer.deserial(HashSet_FieldSerializer.java:19)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   ru.pickbook.shared.model.Order_FieldSerializer.deserialize(Order_FieldSerializer.java:152)     在   ru.pickbook.shared.model.Order_FieldSerializer.deserial(Order_FieldSerializer.java:196)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:95)     在   com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:398)     在   com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:119)     在   com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter $ ResponseReader $ 8.read(RequestCallbackAdapter.java:106)     在   com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:214)     ... 28更多引起:java.lang.RuntimeException:无法找到   类   com.google.gwt.user.client.rpc.core.java.lang.Integer_FieldSerializer     在   com.google.gwt.user.client.rpc.impl.ReflectionHelper.loadClass(ReflectionHelper.java:93)     在   com.google.gwt.user.client.rpc.impl.SerializerBase.getTypeHandler(SerializerBase.java:160)     ... 61更多引起:java.lang.ClassNotFoundException at   com.google.gwt.dev.shell.CompilingClassLoader $ MultiParentClassLoader.findClass(CompilingClassLoader.java:368)     在   com.google.gwt.dev.shell.CompilingClassLoader $ MultiParentClassLoader.loadClass(CompilingClassLoader.java:388)     在java.lang.ClassLoader.loadClass(未知来源)at   java.lang.Class.forName0(Native Method)at   java.lang.Class.forName(未知来源)at   com.google.gwt.user.client.rpc.impl.ReflectionHelper.loadClass(ReflectionHelper.java:91)     ... 62更多

2 个答案:

答案 0 :(得分:4)

-Dgwt.disableGeneratorResultCaching

答案 1 :(得分:0)

该错误不在GWT框架中,而是在浏览器插件中。它不应该在生产模式中发生。

如果可能,切换到SuperDev模式,你将摆脱异常。