我正在尝试通过其远程 sparql 端点查询 Dbpedia 数据集。到目前为止,我已经设法连接到端点并执行正常查询。但是当我执行以下查询时,我得到了一些结果,然后是一个我不知道的异常。有人可以帮忙吗。查询和异常如下。
SELECT DISTINCT ?p ?o WHERE
{ ?p ?x <http://dbpedia.org/resource/Nepal>.
?p <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> ?o. }
例外情况如下
16:51:30 WARN XMLInputStAX$ResultSetStAX :: StAX error: XMLStreamException: Unexpected EOF; was expecting a close tag for element <result>
at [row,col {unknown-source}]: [2068,3]
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF; was expecting a close tag for element <result>
at [row,col {unknown-source}]: [2068,3]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)
at com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2730)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
at com.hp.hpl.jena.sparql.resultset.XMLInputStAX$ResultSetStAX.getOneSolution(XMLInputStAX.java:410)
at com.hp.hpl.jena.sparql.resultset.XMLInputStAX$ResultSetStAX.hasNext(XMLInputStAX.java:217)
at sat.Algorithm.incomingLink(Algorithm.java:128)
at sat.Main.main(Main.java:20)
2 [main] WARN com.hp.hpl.jena.sparql.resultset.XMLInputStAX$ResultSetStAX - StAX error: XMLStreamException: Unexpected EOF; was expecting a close tag for element <result>
at [row,col {unknown-source}]: [2068,3]..........
这是否与结果量太大而耶拿无法处理有关?个人不确定,因为每次执行成功显示的结果数量似乎都不同。所以有人可以帮忙。