[esip-semantictech] [EXTERNAL] Re: Importing SWEET into Protege

John Graybeal jbgraybeal at mindspring.com
Mon Jul 15 20:35:12 EDT 2019


I have some thoughts, but this isn’t the place to diagnose protégé issues. Shouldn’t this be sent to the protégé list? Maybe it has been, but I can’t tell from the ESIP list headers. (It’s also very hard for me to see who the author of any ESIP list message is, but that is a different topic!)

John Graybeal

> On Jul 15, 2019, at 16:23, Mcgibbney, Lewis J (398M) via esip-semanticweb <esip-semanticweb at lists.esipfed.org> 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(OWLOntologyFactoryImpl.java:231) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1293) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1233) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1190) ~[na:na]
>    at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:116) ~[na:na]
>    at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$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:1149) ~[na:1.8.0_191]
>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[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(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_191]
>    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.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:19CC'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(OWLOntologyFactoryImpl.java:231) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1293) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1233) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1190) ~[na:na]
>    at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:116) ~[na:na]
>    at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$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:1149) ~[na:1.8.0_191]
>    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[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(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_191]
>    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.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.getInputStreamFromContentEncoding(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.java:72) ~[na:na]
>    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.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(MissingImportHandlingStrategy.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
> 
> 
> 
> _______________________________________________
> esip-semanticweb mailing list
> esip-semanticweb at lists.esipfed.org
> https://lists.esipfed.org/mailman/listinfo/esip-semanticweb



More information about the esip-semanticweb mailing list