Olá Pessoal, estou tentando ler um arquivo owl pelo JENA, mas quando chamo o método read da classe OntModel, está retornando o erro abaixo:
Será que alguém pode me ajudar? :S
Este é meu owl:
<rdf:RDF
xmlns:rss="http://purl.org/rss/1.0/"
xmlns:jms="http://jena.hpl.hp.com/2003/08/jms#"
xmlns:j.0="http://protege.stanford.edu/plugins/owl/protege#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:vcard="http://www.w3.org/2001/vcard-rdf/3.0#"
xmlns:daml="http://www.daml.org/2001/03/daml+oil#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<owl:Ontology rdf:about="" />
<owl:Class rdf:ID="Motorcycle">
<rdfs:subClassOf>
<owl:Class rdf:about="#RoadVehicle"/>
</rdfs:subClassOf>
</owl:Class>
</rdf:RDF>
Erro:
ERROR [main] (RDFDefaultErrorHandler.java:44) - Premature end of file.
Exception in thread "main" com.hp.hpl.jena.shared.JenaException: org.xml.sax.SAXParseException: Premature end of file.
at com.hp.hpl.jena.rdf.model.impl.RDFDefaultErrorHandler.fatalError(RDFDefaultErrorHandler.java:45)
at com.hp.hpl.jena.rdf.arp.impl.ARPSaxErrorHandler.fatalError(ARPSaxErrorHandler.java:35)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.warning(XMLHandler.java:225)
at com.hp.hpl.jena.rdf.arp.impl.XMLHandler.fatalError(XMLHandler.java:255)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$XMLDeclDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at com.hp.hpl.jena.rdf.arp.impl.RDFXMLParser.parse(RDFXMLParser.java:107)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:158)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:145)
at com.hp.hpl.jena.rdf.arp.JenaReader.read(JenaReader.java:215)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:217)
at com.hp.hpl.jena.ontology.impl.OntModelImpl.read(OntModelImpl.java:2148)
at com.hp.hpl.jena.rdf.model.impl.ModelCom.read(ModelCom.java:202)
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 br.edu.uem.din.trs.cato.SolCombSinonimosVDefesaMestrado.leOnto(SolComb.java:38)
at br.edu.uem.din.trs.cato.SolCombSinonimosVDefesaMestrado.main(SolComb.java:642)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
... 22 more