我正在尝试使用fuseki-server.jar执行SPARQL update查询,代码如下:
UpdateRequest ur = UpdateFactory.create();
ur.add(update);
UpdateProcessRemote r = new UpdateProcessRemote(ur,address);
r.execute();但是,它失败了,出现了以下异常:
SEVERE: Servlet.service() for servlet [QualityAssessment] in context with path [/GTQuality] threw exception [Servlet execution threw an exception] with root cause java.lang.ClassNotFoundException: com.hp.hpl.jena.sparql.modify.UpdateProcessRemote最初的反应是这是一个类路径问题,但是fuseki-server.jar既包含在构建路径中,也包含在WEB-INF/lib中,所以我有点卡住了。完全相同的代码与独立的Java项目一样可以完美地工作。
发布于 2012-11-27 20:41:20
其他地方被问到:http://answers.semanticweb.com/questions/19840/jenasparqlmodifyupdateprocessremote-class-not-found
如果它独立工作,而不是在其他地方工作,那么它就是一个设置问题。
0.2.5版本的fuseki-server.jar包含UpdateProcessRemote:
解压-v fuseki-server.jar | grep UpdateProcessRemote.class ==>
1498 Defl:N 739 51% 2012-10-20 17:05 1517e336 com/hp/hpl/jena/sparql/modify/UpdateProcessRemote.class查找ARQ的其他(旧)副本。
https://stackoverflow.com/questions/13567497
复制相似问题