Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 3.3.0
-
None
Description
raw.githubusercontent.com sends file as text/plain ,
and Jena 3.3.0 has a regression reading such URL:
In 3.20, the real content-type used to be recognized from URL ending, but not anymore.
How to reproduce: org.apache.jena.riot.RDFDataMgr.loadGraph("https://raw.githubusercontent.com/jmvanel/rdf-i18n/master/foaf/foaf.fr.ttl")
Log and stack:
contentType for <http://topbraid.org/schema/schema.ttl> "text/plain; charset=UTF-8"
20:19:57.687 [main] ERROR org.apache.jena.riot - [line: 3, col: 1 ] Expected BNode or IRI: Got: [DIRECTIVE:prefix]
readStoreURINoTransaction: after rdfLoader.load(http://topbraid.org/schema/schema.ttl): Failure(org.apache.jena.riot.RiotException: [line: 3, col: 1 ] Expected BNode or IRI: Got: [DIRECTIVE:prefix])
org.apache.jena.riot.RiotException: [line: 3, col: 1 ] Expected BNode or IRI: Got: [DIRECTIVE:prefix]
at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:136)
at org.apache.jena.riot.lang.LangEngine.raiseException(LangEngine.java:148)
at org.apache.jena.riot.lang.LangEngine.exceptionDirect(LangEngine.java:143)
at org.apache.jena.riot.lang.LangEngine.exception(LangEngine.java:137)
at org.apache.jena.riot.lang.LangNTuple.checkIRIOrBNode(LangNTuple.java:89)
at org.apache.jena.riot.lang.LangNTriples.parseOne(LangNTriples.java:74)
at org.apache.jena.riot.lang.LangNTriples.runParser(LangNTriples.java:53)
at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
at org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:194)
at org.apache.jena.riot.RDFParser.read(RDFParser.java:293)
at org.apache.jena.riot.RDFParser.parseNotUri(RDFParser.java:283)
at org.apache.jena.riot.RDFParser.parse(RDFParser.java:233)
at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:405)
at org.apache.jena.riot.RDFDataMgr.process(RDFDataMgr.java:862)
at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:676)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:222)
at org.apache.jena.riot.RDFDataMgr.read(RDFDataMgr.java:103)
at org.apache.jena.riot.RDFDataMgr.loadGraph(RDFDataMgr.java:354)
at org.w3.banana.jena.io.JenaRDFReader$$anon$2$$anonfun$load$1.apply(JenaRDFReader.scala:76)
Attachments
Issue Links
- links to