Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/370.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 带Rest数据源的SmartGWT错误_Java_Javascript_Gwt_Restlet_Smartgwt - Fatal编程技术网

Java 带Rest数据源的SmartGWT错误

Java 带Rest数据源的SmartGWT错误,java,javascript,gwt,restlet,smartgwt,Java,Javascript,Gwt,Restlet,Smartgwt,从rest数据源检索数据时出现以下错误 00:00:52.439[错误]01:46:57.001:RDQ1:警告:结果集:isc_结果集_1(由:isc_CustomerDocGrid_0创建):获取:无效索引-1 com.smartgwt.client.core.JsObject$SGWT_WARN:01:46:57.001:RDQ1:WARN:ResultSet:isc_ResultSet_1(创建人:isc_CustomerDocGrid_0):get:sun.reflect.Native

从rest数据源检索数据时出现以下错误

00:00:52.439[错误]01:46:57.001:RDQ1:警告:结果集:isc_结果集_1(由:isc_CustomerDocGrid_0创建):获取:无效索引-1 com.smartgwt.client.core.JsObject$SGWT_WARN:01:46:57.001:RDQ1:WARN:ResultSet:isc_ResultSet_1(创建人:isc_CustomerDocGrid_0):get:sun.reflect.NativeConstructorAccessorImpl.newinstance0(本机方法)在sun.reflect.NativeConstructorAccessorImpl.newinstance(nativestructoraccessorimpl.java:39)的无效索引-1在sun.reflect.DelegatingConstructorAccessorImpl.newI instance(DelegatingConstructorAccessorImpl.java:27)在java.lang.reflect.Constructor.newInstance(Constructor.java:513)在com.google.gwt.dev.shell.MethodAdapter.invoke(methodAdapter.java:105)在com.google.gwt.dev.dev.shell.MethodDispatch.invoke(methodHoddispatch.java:71)上com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)com.google.gwt.dev.shell.BrowserChannel.reactomes sages(BrowserChannel.java:1668)com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:401)com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)位于java.lang.Thread.run(Thread.java:619)

这是我的数据源(它扩展了RestDataSource)

代码: 公共CustomerDataSource(字符串id) { setID(id); setDataFormat(DSDataFormat.XML); setRecordXPath(“customerdoc”)


我知道我的web服务正在返回数据,因为我可以在浏览器中显示XML文件。这似乎不是一个解析错误(我以前见过)。我不确定错误的含义。非常感谢您的帮助。

我不知道这到底是什么时候发生的,但通常是在没有收到数据的情况下。 我猜您的xml与预期格式不匹配(xpath错误),因此无法找到任何数据

试试看:

dataSource.setRecordXPath("//customerdoc");

这个答案在技术上是正确的。没有收到任何数据,但这不是xpath问题。查询没有返回任何内容
dataSource.setRecordXPath("//customerdoc");