[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15842438#comment-15842438 ] ASF subversion and git services commented on JENA-1276: --- Commit 05e68d00043f374e7fd28e7342102bc4cd297064 in jena's branch refs/heads/master from [~andy.seaborne] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=05e68d0 ] JENA-1276: Merge commit 'refs/pull/207/head' of github.com:apache/jena Some maintenance after JENA-1276. This closes #207. > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > Fix For: Jena 3.2.0 > > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15842439#comment-15842439 ] ASF subversion and git services commented on JENA-1276: --- Commit 05e68d00043f374e7fd28e7342102bc4cd297064 in jena's branch refs/heads/master from [~andy.seaborne] [ https://git-wip-us.apache.org/repos/asf?p=jena.git;h=05e68d0 ] JENA-1276: Merge commit 'refs/pull/207/head' of github.com:apache/jena Some maintenance after JENA-1276. This closes #207. > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > Fix For: Jena 3.2.0 > > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15821701#comment-15821701 ] ASF GitHub Bot commented on JENA-1276: -- Github user fpservant commented on the issue: https://github.com/apache/jena/pull/203 @afs thanks. JENA-1276 now closed > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > Fix For: Jena 3.2.0 > > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15821524#comment-15821524 ] François-Paul Servant commented on JENA-1276: - jsonld-java 0.9.0 solves the issue > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15820571#comment-15820571 ] Andy Seaborne commented on JENA-1276: - BTW: {{http://schema.org/}} is an HTML page. > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15820568#comment-15820568 ] Andy Seaborne commented on JENA-1276: - The exception is caused by JsonLDReader: {noformat} catch (JsonLdError e) { errorHandler.error(e.getMessage(), -1, -1); throw new RiotException(e) ; } {noformat} so this something being passed up by the JSON-LD engine. This not a Jena issue. > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (JENA-1276) "loading remote context failed" reading JSON-LD
[ https://issues.apache.org/jira/browse/JENA-1276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15820560#comment-15820560 ] Andy Seaborne commented on JENA-1276: - You can surround code blocks with \{noformat\}...\{noformat\} to get code layout. > "loading remote context failed" reading JSON-LD > --- > > Key: JENA-1276 > URL: https://issues.apache.org/jira/browse/JENA-1276 > Project: Apache Jena > Issue Type: Bug > Components: ARQ >Affects Versions: Jena 3.1.1 > Environment: mac osx 10.11, eclipse mars >Reporter: François-Paul Servant > > getting org.apache.jena.riot.RiotException: loading remote context failed: > http://schema.org/ reading json-ld with an @context set to schema.org > see https://github.com/apache/jena/pull/203 > the exception occurs here: > com.github.jsonldjava.core.DocumentLoader.loadDocument(String) line 29 > where I get: > org.apache.http.ConnectionClosedException: Premature end of Content-Length > delimited message body (expected: 124346; received: 0 > {noformat} > public class TestJsonLDReader { > @Test public final void simpleReadTest() { > try { > String jsonld = someSchemaDorOrgJsonld(); > Model m = ModelFactory.createDefaultModel(); > try (StringReader reader = new StringReader(jsonld)) { > m.read(reader, null, "JSON-LD"); > } > assertJohnDoeIsOK(m); > } catch (RiotException e) { > // org.apache.jena.riot.RiotException: loading remote context > failed: http://schema.org/ > e.printStackTrace(); > } > } > /** Example data */ > private String someSchemaDorOrgJsonld() { > return "{\"@id\":\"_:b0\",\"@type\":\"Person\",\"name\":\"John > Doe\",\"@context\":\"http://schema.org/\"};; > } > /** Checking that the data loaded from someSchemaDorOrgJsonld into a > model, is OK */ > private void assertJohnDoeIsOK(Model m) { > assertTrue(m.contains(null, RDF.type, > m.createResource("http://schema.org/Person;))); > assertTrue(m.contains(null, > m.createProperty("http://schema.org/name;), "John Doe")); > } > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)