在动态Web项目中使用Jena读取本体

时间:2015-04-01 18:38:10

标签: eclipse jena ontology pellet apache-jena

所以,我有一个与Jena的Java项目读取Ontology(有几个导入),我试图将它移植到动态Web项目中。

问题是,在DWP中,程序无法读取本体导入。我不知道为什么,但它总是给我com.hp.hpl.jena.shared.DoesNotExistException而正在试图阅读第一个导入。 错误StackTrace:

WARN [main] (OntDocumentManager.java:1078) - An error occurred while attempting to read from http://www.ucam.edu/ontologies/SakaiLanguageOnt. Msg was 'http://www.ucam.edu/ontologies/SakaiLanguageOnt'.
com.hp.hpl.jena.shared.DoesNotExistException: http://www.ucam.edu/ontologies/SakaiLanguageOnt
    at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:89)
    at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:187)
    at com.hp.hpl.jena.util.FileManager.readModelWorker(FileManager.java:367)
    at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:335)
    at com.hp.hpl.jena.util.FileManager.readModel(FileManager.java:319)
    at com.hp.hpl.jena.ontology.OntDocumentManager.read(OntDocumentManager.java:1064)
    at com.hp.hpl.jena.ontology.OntDocumentManager$1.readModel(OntDocumentManager.java:1034)
    at com.hp.hpl.jena.rdf.model.impl.ModelMakerImpl.getModel(ModelMakerImpl.java:78)
    at com.hp.hpl.jena.ontology.OntDocumentManager.fetchLoadedImportModel(OntDocumentManager.java:1031)
    at com.hp.hpl.jena.ontology.OntDocumentManager.fetchPossiblyCachedImportModel(OntDocumentManager.java:1004)
    at com.hp.hpl.jena.ontology.OntDocumentManager.loadImport(OntDocumentManager.java:977)
    at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentManager.java:771)
    at com.hp.hpl.jena.ontology.OntDocumentManager.loadImports(OntDocumentManager.java:709)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.loadImports(OntModelImpl.java:1887)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2150)
    at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:211)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.readDelegate(OntModelImpl.java:3024)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2106)
    at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2022)
    at OntoSakai.OntManager.loadOntModel(OntManager.java:86)
    at OntoSakai.WSInterface.getTypes(WSInterface.java:6)
    at OntoSakai.Main.main(Main.java:29)

该项目与原始项目完全相同。

我在eclipse中使用Apache Jena。

0 个答案:

没有答案