Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Done
-
Jena 2.10.1
-
None
Description
The following code works in Jena 2.10.0.
String TEST_RESOURCE = "http://example.org/test.ttl"; Dataset dataset = DatasetFactory.createMem(); Model model = FileManager.get().loadModel(TEST_RESOURCE, TEST_RESOURCE, "TURTLE");
In Jena 2.10.1 the location-mapping.n3 resource doesn't seem to work and the following exception is thrown:
com.hp.hpl.jena.shared.NotFoundException: Not found: http://example.org/test.ttl
at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:285)
at com.hp.hpl.jena.util.FileManager.loadModelWorker(FileManager.java:309)
at com.hp.hpl.jena.util.FileManager.loadModel(FileManager.java:296)
...
In Jena 2.10.2-SNAPSHOT the exception is different, presumably due to the fix to JENA-505:
org.apache.jena.atlas.web.HttpException: 404 - Not Found at org.apache.jena.riot.web.HttpOp.exec(HttpOp.java:961) at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:232) at org.apache.jena.riot.web.HttpOp.execHttpGet(HttpOp.java:267) at org.apache.jena.riot.stream.LocatorURL.open(LocatorURL.java:46) at org.apache.jena.riot.stream.StreamManager.openNoMapOrNull(StreamManager.java:124) at org.apache.jena.riot.adapters.AdapterFileManager.readModelWorker(AdapterFileManager.java:280) at com.hp.hpl.jena.util.FileManager.loadModelWorker(FileManager.java:309) at com.hp.hpl.jena.util.FileManager.loadModel(FileManager.java:296) ...
In both Jena 2.10.1 and Jena 2.10.2-SNAPSHOT the code works if the line Dataset dataset = DatasetFactory.createMem(); is removed.