Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load SWEET, getting 403 error #127

Closed
graybeal opened this issue Jul 23, 2019 · 6 comments
Closed

Can't load SWEET, getting 403 error #127

graybeal opened this issue Jul 23, 2019 · 6 comments

Comments

@graybeal
Copy link
Contributor

There's a ticket for this at ESIPFed/sweet#150, this is to reference that ticket as it affects BioPortal loading of SWEET.

@carueda
Copy link

carueda commented Jul 23, 2019

In particular, this comment about the diagnosis of the problem: ESIPFed/sweet#150 (comment)

EDIT: I'd add here that this is not strictly speaking a bioportal/protege/owlapi issue -- the 403 is indeed reported from the SWEET server - the issue is that a certain "middleware" there (cloudflare) doesn't like the User-Agent:Java/1.8.0_40 request header sent from these clients.

@jvendetti
Copy link
Member

As a temporary workaround to make SWEET 3.3.0 accessible in BioPortal, I performed the following steps:

  1. Downloaded a local copy of sweetAll.ttl (and all associated imports) from the ESIPFed/sweet repository.
  2. Downloaded a catalog-v00.xml file from ESIPFed that facilitates being able to open the local copy in Protege. See need catalog.xml file mapping sweet namespaces to local files  ESIPFed/sweet#147.
  3. Used the Protege application (v 5.5.0) to merge all imports into a single ontology file, and uploaded that file to BioPortal.

The classes tab now displays a class hierarchy.

@jvendetti
Copy link
Member

I modified my local dev environment to use Open JDK 12 (production BioPortal uses Java 8). With this newer version of Java, the following test case for loading SWEET:

File file = new File("/Users/jvendetti/Development/GitHub/sweet/src/sweetAll.ttl");
FileDocumentSource fileDocumentSource = new FileDocumentSource(file);
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntology ontology = manager.loadOntologyFromOntologyDocument(fileDocumentSource);

... doesn't result in the 403 responses. All unit tests pass in the owlapi_wrapper project against Java 12. I don't see any reason why we couldn't upgrade that portion of the codebase to the latest Java.

@alexskr - are you aware of any roadblocks with our production machines that would prevent us from upgrading to Open JDK 12?

@alexskr
Copy link
Member

alexskr commented Jul 24, 2019

It would be better to use Open JDK 11 because it is LTS.

@graybeal
Copy link
Contributor Author

graybeal commented Oct 3, 2019

Cloudflare has updated their settings and Protege doesn't have any more trouble with the SWEET ontology. Just need to confirm BioPortal works now and fix the auto-download setting.

@jvendetti
Copy link
Member

I modified SWEET in BioPortal to use the load from URL functionality again (http://sweetontology.net/sweetALL). Processing completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants