Skip to content

Could not load imported ontology: <http://purl.org/dc/terms/> #27

Description

@schicho

I am using AML for a uni assignment where we had to create our own ontology "Donde esta la discoteca" and use tools to align them with an existing ontology of that domain.

I am using the AML v3.2 release.

For this i chose to use the music ontology (http://musicontology.com/specification/ & http://purl.org/ontology/mo/). Note that the ontology is half broken as some old re-directs don't seem to work anymore (motools/musicontology#13 among others), hence the "-fixup". So much for persistent URLs...

Nevertheless, even after fixing the mentioned Ontology imports, AML fails to load something as common as http://purl.org/dc/terms/.
See the log output below. Apparently it does not follow the redirect to actually get the ontology definition? See output line Encountered " <INTEGER> "302 "" at line 2, column 14.

Is that the issue here? I am a bit surprised that could be the issue since I thought this redirect pattern is common and also dc/terms is a really common ontology that is used.

What needs to be fixed here or what is the issue?

If you need I can provide you the ontologies.


java -jar AgreementMakerLight.jar -s discoteca.owl -t musicontology-fixed-up.rdfs -o output.txt -a
Loading source ontology
http://www.semanticweb.org/donde/esta/la/discoteca loaded in 1 seconds
Classes: 35
Individuals: 0
Properties: 65
Loading target ontology
Error: Could not open ontologies
org.semanticweb.owlapi.model.UnloadableImportException: Could not load imported ontology: <http://purl.org/dc/terms/> Cause: Problem parsing http://purl.org/dc/terms/
Could not parse ontology.  Either a suitable parser could not be found, or parsing failed.  See parser logs below for explanation.
The following parsers were tried:
1) RDFXMLParser
2) OWLXMLParser
3) OWLFunctionalSyntaxOWLParser
4) TurtleOntologyParser
5) KRSS2OWLParser
6) ManchesterOWLSyntaxOntologyParser
7) OBOFormatOWLAPIParser


Detailed logs:
--------------------------------------------------------------------------------
Parser: RDFXMLParser
org.semanticweb.owlapi.rdf.syntax.RDFParserException: [line=2:column=7] Expecting rdf:RDF element.

--------------------------------------------------------------------------------
Parser: OWLXMLParser
org.xml.sax.SAXParseException; systemId: http://purl.org/dc/terms/; lineNumber: 9; columnNumber: 3; The element type "p" must be terminated by the matching end-tag "</p>".

--------------------------------------------------------------------------------
Parser: OWLFunctionalSyntaxOWLParser
Encountered " <ERROR> "< "" at line 1, column 1.
Was expecting:
    "Ontology" ...
     (Line 0)

--------------------------------------------------------------------------------
Parser: TurtleOntologyParser
uk.ac.manchester.cs.owl.owlapi.turtle.parser.ParseException: Encountered " <INTEGER> "302 "" at line 2, column 14.
Was expecting:
    "." ...
    

--------------------------------------------------------------------------------
Parser: KRSS2OWLParser
de.uulm.ecs.ai.owlapi.krssparser.ParseException: Encountered " ">" "<!DOCTYPE HTML> "" at line 1, column 1.
Was expecting:
    <EOF> 
    

--------------------------------------------------------------------------------
Parser: ManchesterOWLSyntaxOntologyParser
Encountered '<!DOCTYPE HTML>' at line 1 column 1.  Expected either 'Ontology:' or 'Prefix:' (Line 1)

--------------------------------------------------------------------------------
Parser: OBOFormatOWLAPIParser
LINENO: 1 - Could not find tag separator ':' in line.
LINE: <html>


	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1260)
	at org.coode.owlapi.rdfxml.parser.TPImportsHandler.handleTriple(TPImportsHandler.java:81)
	at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.handleStreaming(OWLRDFConsumer.java:2146)
	at org.coode.owlapi.rdfxml.parser.OWLRDFConsumer.statementWithResourceValue(OWLRDFConsumer.java:2103)
	at org.semanticweb.owlapi.rdf.syntax.RDFParser.statementWithResourceValue(RDFParser.java:510)
	at org.semanticweb.owlapi.rdf.syntax.RDFParser$EmptyPropertyElement.startElement(RDFParser.java:957)
	at org.semanticweb.owlapi.rdf.syntax.RDFParser$PropertyElementList.startElement(RDFParser.java:851)
	at org.semanticweb.owlapi.rdf.syntax.RDFParser.startElement(RDFParser.java:212)
	at org.coode.owlapi.rdfxml.parser.RDFXMLParser$1.startElement(RDFXMLParser.java:88)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:518)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2726)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:114)
	at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:542)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:889)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:825)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1224)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:637)
	at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:326)
	at org.semanticweb.owlapi.rdf.syntax.RDFParser.parse(RDFParser.java:139)
	at org.coode.owlapi.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.java:117)
	at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:204)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:827)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:771)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:784)
	at aml.ontology.Ontology.<init>(Ontology.java:137)
	at aml.AML.openOntologies(AML.java:898)
	at aml.Main.main(Main.java:179)
Caused by: org.semanticweb.owlapi.io.UnparsableOntologyException: Problem parsing http://purl.org/dc/terms/
Could not parse ontology.  Either a suitable parser could not be found, or parsing failed.  See parser logs below for explanation.
The following parsers were tried:
1) RDFXMLParser
2) OWLXMLParser
3) OWLFunctionalSyntaxOWLParser
4) TurtleOntologyParser
5) KRSS2OWLParser
6) ManchesterOWLSyntaxOntologyParser
7) OBOFormatOWLAPIParser


Detailed logs:
--------------------------------------------------------------------------------
Parser: RDFXMLParser
org.semanticweb.owlapi.rdf.syntax.RDFParserException: [line=2:column=7] Expecting rdf:RDF element.

--------------------------------------------------------------------------------
Parser: OWLXMLParser
org.xml.sax.SAXParseException; systemId: http://purl.org/dc/terms/; lineNumber: 9; columnNumber: 3; The element type "p" must be terminated by the matching end-tag "</p>".

--------------------------------------------------------------------------------
Parser: OWLFunctionalSyntaxOWLParser
Encountered " <ERROR> "< "" at line 1, column 1.
Was expecting:
    "Ontology" ...
     (Line 0)

--------------------------------------------------------------------------------
Parser: TurtleOntologyParser
uk.ac.manchester.cs.owl.owlapi.turtle.parser.ParseException: Encountered " <INTEGER> "302 "" at line 2, column 14.
Was expecting:
    "." ...
    

--------------------------------------------------------------------------------
Parser: KRSS2OWLParser
de.uulm.ecs.ai.owlapi.krssparser.ParseException: Encountered " ">" "<!DOCTYPE HTML> "" at line 1, column 1.
Was expecting:
    <EOF> 
    

--------------------------------------------------------------------------------
Parser: ManchesterOWLSyntaxOntologyParser
Encountered '<!DOCTYPE HTML>' at line 1 column 1.  Expected either 'Ontology:' or 'Prefix:' (Line 1)

--------------------------------------------------------------------------------
Parser: OBOFormatOWLAPIParser
LINENO: 1 - Could not find tag separator ':' in line.
LINE: <html>


	at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:234)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:827)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:745)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadImports(OWLOntologyManagerImpl.java:1221)
	at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1254)
	... 30 more

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions