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

JENA Parser throw Error if HTTP Content Type Header not present #815

Open
haideriqbal opened this issue Dec 10, 2024 · 2 comments
Open

JENA Parser throw Error if HTTP Content Type Header not present #815

haideriqbal opened this issue Dec 10, 2024 · 2 comments
Assignees
Labels

Comments

@haideriqbal
Copy link
Collaborator

At present, if there is not Content Type header present in the ontology URL then the parser throws

org.apache.jena.riot.RiotException: Failed to determine the content type: (URI=http://www.linkedmodel.org/schema/dtype : stream=null)
ols4-dataload-1  |      at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:317)
ols4-dataload-1  |      at org.apache.jena.riot.RDFParser.parse(RDFParser.java:296)
ols4-dataload-1  |      at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:540)
ols4-dataload-1  |      at uk.ac.ebi.rdf2json.OntologyGraph.parseRDF(OntologyGraph.java:92)
ols4-dataload-1  |      at uk.ac.ebi.rdf2json.OntologyGraph.<init>(OntologyGraph.java:165)
ols4-dataload-1  |      at uk.ac.ebi.rdf2json.RDF2JSON.main(RDF2JSON.java:147)

This issue is blocking loading of EMI ontology specified here: #814

Ideal solution would be if there is any setting in the JENA parser to interpret the content type without the content-type header.

@haideriqbal haideriqbal self-assigned this Dec 10, 2024
@jamesamcl
Copy link
Member

I think this should be fixed upstream by the webserver that distributes the ontology. we shouldn't have to guess the format

@jamesamcl
Copy link
Member

Also I would be very happy if #762 could be reviewed before making changes in this area or it will no longer be applicable

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

No branches or pull requests

2 participants