0

I created the owl file with Protégé 5.0 .. But I got this error when I load in java code .. May I know if you have any idea for this.

Thanks & Regards, Su

org.semanticweb.owl.io.UnparsableOntologyException: Problem parsing file:/C:/.../owls/PCOCPG.owl 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) OWLOBOParser 6) KRSS2OWLParser 7) ManchesterOWLSyntaxOntologyParser

Detailed logs:
--------------------------------------------------------------------------------
Parser: RDFXMLParser
edu.unika.aifb.rdf.api.syntax.RDFParserException: [line=18:column=72] Expecting rdf:RDF element.

--------------------------------------------------------------------------------
Parser: OWLXMLParser
(Current element Prefix

--------------------------------------------------------------------------------
Parser: OWLFunctionalSyntaxOWLParser
org.coode.owl.functionalparser.ParseException: Encountered "<" at line 1, column 1.
Was expecting one of:
    "Ontology" ...
    "Namespace" ...
     (Line 0)

--------------------------------------------------------------------------------
Parser: TurtleOntologyParser
java.net.URISyntaxException: Illegal character in query at index 4: ?xml version="1.0"?

--------------------------------------------------------------------------------
Parser: OWLOBOParser
org.coode.obo.parser.ParseException: Encountered "<!DOCTYPE Ontology " at line 4, column 1.
Was expecting:
    "\n" ...


--------------------------------------------------------------------------------
Parser: KRSS2OWLParser
de.uulm.ecs.ai.owl.krssparser.ParseException: Encountered "<?xml version=\"1.0\"?>" at line 1, column 1.
Was expecting one of:
    <EOF> 
    "(" ...
    "end-tbox" ...
    "end-abox" ...


--------------------------------------------------------------------------------
Parser: ManchesterOWLSyntaxOntologyParser
org.coode.manchesterowlsyntax.ManchesterOWLSyntaxParserException: Expected 'Ontology:' <URI>


    at uk.ac.manchester.cs.owl.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:191)
    at uk.ac.manchester.cs.owl.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:461)
    at uk.ac.manchester.cs.owl.OWLOntologyManagerImpl.loadOntologyFromPhysicalURI(OWLOntologyManagerImpl.java:430)
    at org.bootstrep.onthology.pcocpg.PCOCPGOntology.readOntology(PCOCPGOntology.java:144)
    at org.bootstrep.eventextract.lingpattern.util.ReadConditionPattern.main(ReadConditionPattern.java:451)
Kate
  • 23
  • 2
  • You need to provide the code that resulted in the parsing error as well. Generally OWL API's parsers need a specific input and if the input format is not as desired this happens. – Artemis Mar 03 '15 at 10:25

2 Answers2

1

The first parser error is the one that refers to your case.

Detailed logs:

Parser: RDFXMLParser edu.unika.aifb.rdf.api.syntax.RDFParserException: [line=18:column=72] Expecting rdf:RDF element.

Can you share the ontology being parsed? It appears to have a problem around line 18.

Ignazio
  • 10,504
  • 1
  • 14
  • 25
  • At first I save the owl file with OWL/XML format and I got that Error. Now I changed it to save with RDF/XML .., it's work .. Thank You all . ^_^ – Kate Mar 04 '15 at 02:12
0

At first I save the owl file with OWL/XML format and I got that Error.

Now I changed it to save with RDF/XML .., it's work ..

Thank You all . ^_^

Kate
  • 23
  • 2