[esip-semantictech] [EXTERNAL] Re: Importing SWEET into Protege
brandon whitehead
brandonnodnarb at gmail.com
Tue Jul 16 05:45:10 EDT 2019
It appears a handful of the ttl files are munted. I've created an issue [1]
explaining my findings. I'm working on it now and hope to have it resolved
before the sessions start today.
/Brandon
[1] https://github.com/ESIPFed/sweet/issues/122
On Mon, 2019-07-15 at 23:23 +0000, Mcgibbney, Lewis J (398M) wrote:
> CC'ing esip-semtech mailing list
>
> I built Protégé from source at https://github.com/protegeproject/protege.git
>
> Once I load data from URL, this leads to the following stack trace
>
> org.semanticweb.owlapi.io.OWLOntologyCreationIOException: Server returned
> HTTP response code: 403 for URL: http://sweetontology.net/sweetAll
> at
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOnt
> ologyFactoryImpl.java:231) ~[na:na]
> at
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntolog
> yManagerImpl.java:1293) ~[na:na]
> at
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntolo
> gyManagerImpl.java:1233) ~[na:na]
> at
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntolo
> gyDocument(OWLOntologyManagerImpl.java:1190) ~[na:na]
> at
> org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(Ontology
> Loader.java:116) ~[na:na]
> at
> org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThr
> ead$0(OntologyLoader.java:68) ~[na:na]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> ~[na:1.8.0_191]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
> 49) ~[na:1.8.0_191]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
> 24) ~[na:1.8.0_191]
> at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
> Caused by: java.io.IOException: Server returned HTTP response code: 403 for
> URL: http://sweetontology.net/sweetAll
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method) ~[na:1.8.0_191]
> at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
> sorImpl.java:62) ~[na:1.8.0_191]
> at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
> torAccessorImpl.java:45) ~[na:1.8.0_191]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1944)
> ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection$10.run(HttpURLConnection.java:1939)
> ~[na:1.8.0_191]
> at java.security.AccessController.doPrivileged(Native Method)
> ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1938
> ) ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1508
> ) ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492
> ) ~[na:1.8.0_191]
> at
> org.semanticweb.owlapi.io.AbstractOWLParser.getInputStreamFromContentEncodin
> g(AbstractOWLParser.java:176) ~[na:na]
> at
> org.semanticweb.owlapi.io.AbstractOWLParser.getInputStream(AbstractOWLParser
> .java:138) ~[na:na]
> at
> org.semanticweb.owlapi.io.AbstractOWLParser.getInputSource(AbstractOWLParser
> .java:273) ~[na:na]
> at
> org.semanticweb.owlapi.rdf.rdfxml.parser.RDFXMLParser.parse(RDFXMLParser.jav
> a:72) ~[na:na]
> at
> uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOnt
> ologyFactoryImpl.java:221) ~[na:na]
> ... 9 common frames omitted
> Caused by: java.io.IOException: Server returned HTTP response code: 403 for
> URL: http://sweetontology.net/sweetAll
> at sun.net.
> www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1894
> ) ~[na:1.8.0_191]
> at sun.net.
> www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492
> ) ~[na:1.8.0_191]
> at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
> ~[na:1.8.0_191]
> at
> org.semanticweb.owlapi.io.AbstractOWLParser.getInputStream(AbstractOWLParser
> .java:112) ~[na:na]
> ... 12 common frames omitted
>
> Once I navigate to OntologyLoader.java I can see that the
> OWLOntologyLoaderConfiguration provides an .setFollowRedirects(boolean)
> method. Once I set this to true as follows
>
> OWLOntologyLoaderConfiguration configuration = new
> OWLOntologyLoaderConfiguration();
> configuration = configuration
> .setMissingImportHandlingStrategy(MissingImportHandlingStrat
> egy.SILENT)
> .setFollowRedirects(true);
> IRIDocumentSource documentSource = new
> IRIDocumentSource(IRI.create(documentURI));
> ontology =
> loadingManager.loadOntologyFromOntologyDocument(documentSource,
> configuration);
>
> ... I still get the same error. I stepped through the source right down to
> the owlapi level but I am not yet able to see the source of the issue.
>
> In short, I *think* that Protégé definitely has issues following redirects
> within input IRI's. I'm going to work this with the protégé users community
> in a bid to get to the bottom of this.
> Lewis
>
>
> On 7/15/19, 4:12 PM, "Carlos Rueda" <carueda at mbari.org> wrote:
>
> Ditto, thanks Simon for the tests!
>
> Carlos
>
>
> ----- Original Message -----
> > From: "brandon whitehead" <brandonnodnarb at gmail.com>
> > To: "Simon Cox" <Simon.Cox at csiro.au>, "Carlos Rueda" <
> carueda at mbari.org>
> > Sent: Monday, July 15, 2019 4:03:08 PM
> > Subject: Re: [esip-semantictech] Importing SWEET into Protege
>
> > Interesting. Thanks for testing, Simon.
> > /Brandon
> >
> > On 15/07/19 10:54 PM, Cox, Simon (L&W, Clayton) wrote:
> >> I have just loaded in TopBraid 6.2 from the URI
> >> http://sweetontology.net/sweetAll as a straight web-import.
> >> But I also can't load in Protégé.
> >>
> >> -----Original Message-----
> >> From: esip-semanticweb <esip-semanticweb-bounces at lists.esipfed.org>
> On Behalf Of
> >> brandon whitehead via esip-semanticweb
> >> Sent: Monday, 15 July, 2019 14:44
> >> To: Carlos Rueda <carueda at mbari.org>; esip-semanticweb
> >> <esip-semanticweb at lists.esipfed.org>
> >> Subject: Re: [esip-semantictech] Importing SWEET into Protege
> >>
> >> Hi Carlos,
> >>
> >> Many thanks for the reply. More below.
> >>
> >> On 15/07/19 10:05 PM, Carlos Rueda wrote:
> >>> [Fatal Error] :1:50: White spaces are required between publicID
> and
> >>> systemID.
> >>>
> >>> I've been digging around in my protege log file, but it doesn't
> >>> actually show up there (the previous output is from the command
> line).
> >>>
> >>> For further context, the page successfully redirects if I hit
> it in a
> >>> browser. If I try to load one of the ontology files, for
> example
> >>> http://sweetontology.net/humanAgriculture, in a browser it
> pushes me to
> >>> the COR page as expected. I can curl the URL and get a valid
> response
> >>> (full turtle file), but if I try the same thing via Protege
> (loading
> >>> that specific ttl file via URL instead of a local copy) I get a
> 403
> >>> error --- the same issue Lewis described.
> >>>
> >>>
> >>> Same here. I just did a few tests using HTTPie with variations of
> the
> >>> basic http://sweetontology.net/sweetAll request, and all responded
> as
> >>> expected, except when trying the relevant ones in Protege (resulting
> >>> in 403), eg:
> >>>
> >>> http://sweetontology.net/sweetAll --Protege should prefer an RDF
> >>> representation via content negotiation)
> >>>
> >>> http://sweetontology.net/sweetAll.rdf -- explicit preference for
> RDF
> >>> via filename extension
> >>>
> >>> My HTTPie based tests suggest that the 403 error is not being
> >>> generated from the sweetontology.net proxy-pass nor from the COR
> >>> service. So perhaps worth re-trying all of this with a newer
> Protege
> >>> version(?).
> >>
> >> Interesting. Protege 5.5 is the newest stable version. I've not
> tried buidling
> >> from source via git and testing. However, the response/error is the
> same in
> >> TopBraid Composer (5.3) as was described in Protege so it's a bigger
> issue.
> >> Perhaps OWLAPI?
> >>
> >> Cheers,
> >> /Brandon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.esipfed.org/pipermail/esip-semanticweb/attachments/20190716/f9527691/attachment-0001.sig>
More information about the esip-semanticweb
mailing list