Import error

18 views
Skip to first unread message

Mikael

unread,
Apr 2, 2020, 7:30:22 AM4/2/20
to HermiT Users
Hi,

I'm trying to import XML OWL file from Manchester file:


owl1.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rdf:RDF>
...


but get error

Parser: OWLXMLParser
org.xml.sax.SAXParseException; systemId: http://localhost/schema/kb.openrobots.org.owl; lineNumber: 1; columnNumber: 50; White spaces are required between publicId and systemId.
...
Parser: ManchesterOWLSyntaxOntologyParser
Encountered '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">' at line 1 column 1.  Expected either 'Ontology:' or 'Prefix:' (Line 1)


        at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:236)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:880)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:800)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadImports(OWLOntologyManagerImpl.java:1278)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.makeLoadImportRequest(OWLOntologyManagerImpl.java:1309)


This error also comes whether the imported file exists on not. Any ideas what could be wrong here?

Mikael

unread,
Apr 2, 2020, 7:40:22 AM4/2/20
to HermiT Users
This error seems to occur independent of what the imported file is.

Ignazio Palmisano

unread,
Apr 2, 2020, 7:54:12 AM4/2/20
to Mikael, HermiT Users
Hi,
As seen in the stack trace, the import resolves to a web page, not an owl file. Possibly a 400 page?

However, Manchester syntax is not XML, so either the file extension or the expected language are wrong - I'd expect the content to be owl/XML or rdf/XML, not Manchester syntax.

Cheers,
Ignazio


--
You received this message because you are subscribed to the Google Groups "HermiT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermit-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hermit-users/a9da91e6-4f57-400d-915b-997cc9b93c6f%40googlegroups.com.

Mikael

unread,
Apr 2, 2020, 8:05:35 AM4/2/20
to HermiT Users
That was the reason, localhost was responding 301. Now I get this error:

Exception in thread "main" java.lang.NullPointerException
        at org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxEditorParser.parseOntology(ManchesterOWLSyntaxEditorParser.java:2607)
        at org.coode.owlapi.manchesterowlsyntax.ManchesterOWLSyntaxOntologyParser.parse(ManchesterOWLSyntaxOntologyParser.java:125)
        at uk.ac.manchester.cs.owl.owlapi.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:206)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:880)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:800)
        at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:758)
        at org.semanticweb.HermiT.cli.CommandLine.main(Unknown Source)


Tried importing XML, Manchester. And if there is a syntax error, parser correctly shows the error, but when errors are fixed, above stack is shown. And this comes only when importing another file.


On Thursday, 2 April 2020 14:30:22 UTC+3, Mikael wrote:

Ignazio Palmisano

unread,
Apr 2, 2020, 8:36:50 AM4/2/20
to Mikael, HermiT Users
Can you raise this as an issue on the owlapi tracker, including the content of the import that's failing?

I don't think it's a HermiT issue.

Cheers,
Ignazio

--
You received this message because you are subscribed to the Google Groups "HermiT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hermit-users...@googlegroups.com.
Message has been deleted

Mikael

unread,
Apr 2, 2020, 9:05:25 AM4/2/20
to HermiT Users
To unsubscribe from this group and stop receiving emails from it, send an email to hermit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages