gpt4 book ai didi

java - GWT 通过 RPC 发送类型 OBJECT

转载 作者:行者123 更新时间:2023-11-29 10:07:15 24 4
gpt4 key购买 nike

我正在尝试这样做

服务接口(interface):

Boolean SaveObjectIntoDatabase(Object Entity);

服务异步:

void SaveObjectIntoDatabase(Object Entity,AsyncCallback <Boolean> Callback);

然后在serviceimpl上实现

没有成功。

是不是我们不能通过GWT RPC发送一个object类型的变量??

堆栈跟踪:

onModuleLoad() threw an exception

Exception while loading module com.BiddingSystem.client.BiddingSystem. See Development Mode for details.
java.lang.reflect.InvocationTargetException 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.ModuleSpace.onLoad(ModuleSpace.java:396) at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:183) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.RuntimeException: Deferred binding failed for 'com.BiddingSystem.client.Service' (did you forget to inherit a required module?) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:53) at com.google.gwt.core.client.GWT.create(GWT.java:97) at com.BiddingSystem.client.BiddingSystem.onModuleLoad(BiddingSystem.java:63) ... 9 more Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries) at com.google.gwt.dev.shell.ModuleSpace.rebind(ModuleSpace.java:595) at com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:455) at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:49) ... 11 more

最佳答案

类 java.lang.Object 不是 serializable .

关于java - GWT 通过 RPC 发送类型 OBJECT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4465692/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com