[ 
https://issues.apache.org/jira/browse/JENA-509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Piotr Hołubowicz updated JENA-509:
----------------------------------

    Description: 
The following code works in Jena 2.10.0.

{code}
        String TEST_RESOURCE = "http://example.org/test.ttl";;
        Dataset dataset = DatasetFactory.createMem();
        Model model = FileManager.get().loadModel(TEST_RESOURCE, TEST_RESOURCE, 
"TURTLE");
{code}

In Jena 2.10.1 the location-mapping.n3 resource doesn't seem to work and the 
following exception is thrown:

{code}
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)
...
{code}

In Jena 2.10.2-SNAPSHOT the exception is different, presumably due to the fix 
to JENA-505:

{code}
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)
...
{code}

In both Jena 2.10.1 and Jena 2.10.2-SNAPSHOT the code works if the line 
{{Dataset dataset = DatasetFactory.createMem();}} is removed. 


  was:
The following code works in Jena 2.10.0.

{code}
        String TEST_RESOURCE = "http://example.org/test.ttl";;
        Dataset dataset = DatasetFactory.createMem();
        Model model = FileManager.get().loadModel(TEST_RESOURCE, TEST_RESOURCE, 
"TURTLE");
{code}

In Jena 2.10.1 the location-mapping.n3 resource doesn't seem to work and the 
following exception is thrown:

{code}
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)
...
{code}

In Jena 2.10.2-SNAPSHOT the exception is different, presumably due to the fix 
to JENA-505:

{code}
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)
...
{code}

    
> Location mapping doesn't work properly when preceded by calling 
> DatasetFactory#createMem
> ----------------------------------------------------------------------------------------
>
>                 Key: JENA-509
>                 URL: https://issues.apache.org/jira/browse/JENA-509
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: Jena
>    Affects Versions: Jena 2.10.1
>            Reporter: Piotr Hołubowicz
>         Attachments: jena-509.zip
>
>
> The following code works in Jena 2.10.0.
> {code}
>         String TEST_RESOURCE = "http://example.org/test.ttl";;
>         Dataset dataset = DatasetFactory.createMem();
>         Model model = FileManager.get().loadModel(TEST_RESOURCE, 
> TEST_RESOURCE, "TURTLE");
> {code}
> In Jena 2.10.1 the location-mapping.n3 resource doesn't seem to work and the 
> following exception is thrown:
> {code}
> 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)
> ...
> {code}
> In Jena 2.10.2-SNAPSHOT the exception is different, presumably due to the fix 
> to JENA-505:
> {code}
> 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)
> ...
> {code}
> In both Jena 2.10.1 and Jena 2.10.2-SNAPSHOT the code works if the line 
> {{Dataset dataset = DatasetFactory.createMem();}} is removed. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to