无法获得服务器协议;此服务器上没有此类资源

时间:2015-07-24 03:47:00

标签: sparql semantic-web sesame linked-data

我正在尝试在Sesame上运行以下查询:

PREFIX dbp-ontology: <http://dbpedia.org/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbpedia-owl: <http://dbpedia.org/owl/>
PREFIX dbpedia-prop: <http://dbpedia.org/property/>

select ?country ?capital
where{
  SERVICE <http://factforge.net/sparql>{
    ?country a  dbp-ontology:Country .
    ?country dbpedia-prop:capital ?capital .
  }
} LIMIT 100

在我安装了Sesame的计算机上成功执行了查询。在另一台计算机上,Sesame报告以下错误:

Query evaluation error: org.openrdf.query.QueryEvaluationException: Failed to get server protocol; no such resource on this server: http://factforge.net/sparql?queryLn=SPARQL&query=PREFIX+dbp-ontology%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E+PREFIX+rdf%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E+PREFIX+dbpedia-owl%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fowl%2F%3E+PREFIX+dbpedia-prop%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fproperty%2F%3E+PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+PREFIX+sesame%3A+%3Chttp%3A%2F%2Fwww.openrdf.org%2Fschema%2Fsesame%23%3E+PREFIX+owl%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2002%2F07%2Fowl%23%3E+PREFIX+xsd%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema%23%3E+PREFIX+fn%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2005%2Fxpath-functions%23%3E+SELECT++%3Fcountry+WHERE+%7B+%3Fcountry+a+dbp-ontology%3ACountry+.+%7D&infer=true

造成这种情况的原因是什么?怎么解决?上面的超链接实际上在浏览器中显示查询结果。

更新:所有这些都适用于无法建立与FactForge的连接的计算机:

  1. 我使用的是2.7.16

  2. 通过工作台执行查询

  3. 以下是来自名为tomcat8-stderr的日志文件:

  4. 31-Jul-2015 15:15:37.717警告[http-nio-8080-exec-3] org.openrdf.http.client.HTTPClient.getErrorInfo服务器报告问题:查询评估错误:org.openrdf.query。 QueryEvaluationException: 2015年7月31日15:15:37.718警告[http-nio-8080-exec-3] org.openrdf.workbench.commands.QueryServlet.handleStandardBrowserRequest org.openrdf.repository.http.HTTPQueryEvaluationException:查询评估错误:org.openrdf .query.QueryEvaluationException:  org.openrdf.repository.http.HTTPQueryEvaluationException:查询评估错误:org.openrdf.query.QueryEvaluationException:     at org.openrdf.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:59)     在org.openrdf.workbench.util.QueryEvaluator.evaluateTupleQuery(QueryEvaluator.java:152)     在org.openrdf.workbench.util.QueryEvaluator.evaluate(QueryEvaluator.java:287)     at org.openrdf.workbench.util.QueryEvaluator.extractQueryAndEvaluate(QueryEvaluator.java:120)     在org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:382)     在org.openrdf.workbench.commands.QueryServlet.handleStandardBrowserRequest(QueryServlet.java:216)     在org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:206)     在org.openrdf.workbench.base.TransformationServlet.service(TransformationServlet.java:109)     在org.openrdf.workbench.commands.QueryServlet.service(QueryServlet.java:163)     在org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:142)     在org.openrdf.workbench.proxy.ProxyRepositoryServlet.service(ProxyRepositoryServlet.java:104)     在org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:222)     在org.openrdf.workbench.proxy.WorkbenchServlet.handleRequest(WorkbenchServlet.java:151)     在org.openrdf.workbench.proxy.WorkbenchServlet.service(WorkbenchServlet.java:119)     在org.openrdf.workbench.proxy.WorkbenchGateway.service(WorkbenchGateway.java:131)     在org.openrdf.workbench.base.BaseServlet.service(BaseServlet.java:142)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在org.openrdf.workbench.proxy.CacheFilter.doFilter(CacheFilter.java:75)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在org.openrdf.workbench.proxy.CookieCacheControlFilter.doFilter(CookieCacheControlFilter.java:63)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)     在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)     在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)     在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)     在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)     在org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617)     在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)     在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)     在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)     at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:668)     在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1527)     在org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.run(NioEndpoint.java:1484)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(Unknown Source)     at org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61)     在java.lang.Thread.run(未知来源) 引起:org.openrdf.repository.RepositoryException:查询评估错误:org.openrdf.query.QueryEvaluationException:     在org.openrdf.http.client.HTTPClient.handleHTTPError(HTTPClient.java:953)     在org.openrdf.http.client.HTTPClient.sendTupleQueryViaHttp(HTTPClient.java:718)     at org.openrdf.http.client.HTTPClient.getBackgroundTupleQueryResult(HTTPClient.java:602)     在org.openrdf.http.client.HTTPClient.sendTupleQuery(HTTPClient.java:367)     at org.openrdf.repository.http.HTTPTupleQuery.evaluate(HTTPTupleQuery.java:53)     ......还有42个

    1. 这是一个可重复的问题
    2. 计算机之间存在两个差异:
    3. 功能性芝麻计算机 - Windows 8,存储芝麻数据的文件夹路径显示在&#39;关于&#39;页

      子功能芝麻计算机 - Windows 7.未提及文件夹路径。

1 个答案:

答案 0 :(得分:0)

通过重新安装从jre开始的所有内容解决了这个问题。计算机上有两个版本的jre,我想在删除之前的版本后重新安装一个版本就可以了。除了jre(即作为Java SE包的一个组件),我还重新安装了Tomcat和Sesame。