0

So, I have a Java Project with Jena that reads an Ontology (With several imports) and I'm trying to port it into a Dynamic Web Project.

The problem is that, in the DWP, the program cant read the ontology imports. I dont know why, but it always give me com.hp.hpl.jena.shared.DoesNotExistException while is triying to read the first import. Error 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)

The project is exactly like the original.

I'm using Apache Jena in eclipse.

LokiNkc
  • 55
  • 1
  • 9
  • 1
    just "com.hp.hpl.jena.shared.DoesNotExistException"? You don't get a stacktrace that might help pinpoint the issue? – Joshua Taylor Apr 02 '15 at 03:43
  • What are the imports you are trying to read? Might be local files that the container might not be allowed to read, or relative paths? – Ignazio Apr 02 '15 at 08:18
  • Well, of course it gets stacktrace. I'll Post it in the main message. Are other Ontologies. The structure es something like that: MainOntology->OntologyA->OntologyB I can read mainOntology but no the others, the imports are made using the URI, and it works fine in the other project. – LokiNkc Apr 02 '15 at 09:32
  • wget http://www.ucam.edu/ontologies/SakaiLanguageOnt gives me "HTTP/1.1 404 Not Found" – AndyS Apr 02 '15 at 10:21
  • Yes. There are no online. But it works un the local project. Is there any way yo importante it using the local path? – LokiNkc Apr 02 '15 at 12:17

0 Answers0