[ 
https://issues.apache.org/jira/browse/ANY23-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16079312#comment-16079312
 ] 

William L. Anderson commented on ANY23-303:
-------------------------------------------

A similar error occurs when trying to build the 2.0 any23-core component from 
the 2.0 (and 2.1) source.

In this case the JsonLdError is "loading remote context failed: 
http://json-ld.org/contexts/person.jsonld";

The build terminates at this point and all subsequent modules are skipped.

Partial stack  trace:
{code:java}
Running org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest
[2017-07-08 15:45:41,523] INFO  1204[main] - 
org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:220)
 - Processing http://bob.example.com/
[2017-07-08 15:45:42,389] INFO  2070[main] - 
org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:220)
 - Processing http://bob.example.com/
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.087 sec <<< 
FAILURE! - in org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest
testEmbeddedJSONLDInHead(org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest)
  Time elapsed: 0.867 sec  <<< ERROR!
java.lang.RuntimeException: org.apache.any23.extractor.ExtractionException: 
Error while parsing RDF document.
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:30)
Caused by: org.apache.any23.extractor.ExtractionException: Error while parsing 
RDF document.
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:30)
Caused by: org.eclipse.rdf4j.rio.RDFParseException: Could not parse JSONLD
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:30)
Caused by: com.github.jsonldjava.core.JsonLdError: loading remote context 
failed: http://json-ld.org/contexts/person.jsonld
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:30)

testSeveralEmbeddedJSONLDInHead(org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest)
  Time elapsed: 0.218 sec  <<< ERROR!
java.lang.RuntimeException: org.apache.any23.extractor.ExtractionException: 
Error while parsing RDF document.
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testSeveralEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:37)
Caused by: org.apache.any23.extractor.ExtractionException: Error while parsing 
RDF document.
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testSeveralEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:37)
Caused by: org.eclipse.rdf4j.rio.RDFParseException: Could not parse JSONLD
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testSeveralEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:37)
Caused by: com.github.jsonldjava.core.JsonLdError: loading remote context 
failed: http://json-ld.org/contexts/person.jsonld
        at 
org.apache.any23.extractor.html.EmbeddedJSONLDExtractorTest.testSeveralEmbeddedJSONLDInHead(EmbeddedJSONLDExtractorTest.java:37)
{code}






> JsonLdError: loading remote context failed: http://schema.org/
> --------------------------------------------------------------
>
>                 Key: ANY23-303
>                 URL: https://issues.apache.org/jira/browse/ANY23-303
>             Project: Apache Any23
>          Issue Type: Bug
>          Components: extractors
>    Affects Versions: 2.1
>            Reporter: Matt Snyder
>             Fix For: 2.1
>
>
> For an html page with embedded json-ld, I'm getting JsonLdError: loading 
> remote context failed: http://schema.org/
> Could it be a manifestation of issue #180 on jsonld-java ?  That issue is 
> marked closed.
> Full traceback:
> {code:java}
> org.apache.any23.extractor.ExtractionException: Error while parsing RDF 
> document.
>       at 
> org.apache.any23.extractor.rdf.BaseRDFExtractor.run(BaseRDFExtractor.java:109)
>       at 
> org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.extractJSONLDScript(EmbeddedJSONLDExtractor.java:149)
>       at 
> org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.run(EmbeddedJSONLDExtractor.java:82)
>       at 
> org.apache.any23.extractor.html.EmbeddedJSONLDExtractor.run(EmbeddedJSONLDExtractor.java:53)
>       at 
> org.apache.any23.extractor.SingleDocumentExtraction.runExtractor(SingleDocumentExtraction.java:475)
>       at 
> org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:256)
>       at org.apache.any23.Any23.extract(Any23.java:300)
>       at org.apache.any23.Any23.extract(Any23.java:452)
>       at org.apache.any23.cli.Rover.performExtraction(Rover.java:178)
>       at org.apache.any23.cli.Rover.run(Rover.java:211)
>       at org.apache.any23.cli.ToolRunner.execute(ToolRunner.java:136)
>       at org.apache.any23.cli.ToolRunner.main(ToolRunner.java:69)
> Caused by: org.eclipse.rdf4j.rio.RDFParseException: Could not parse JSONLD
>       at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:71)
>       at 
> org.apache.any23.extractor.rdf.BaseRDFExtractor.run(BaseRDFExtractor.java:105)
>       ... 11 more
> Caused by: com.github.jsonldjava.core.JsonLdError: loading remote context 
> failed: http://schema.org/
>       at 
> com.github.jsonldjava.core.DocumentLoader.loadDocument(DocumentLoader.java:31)
>       at com.github.jsonldjava.core.Context.parse(Context.java:195)
>       at com.github.jsonldjava.core.Context.parse(Context.java:142)
>       at com.github.jsonldjava.core.Context.parse(Context.java:286)
>       at com.github.jsonldjava.core.JsonLdApi.expand(JsonLdApi.java:543)
>       at com.github.jsonldjava.core.JsonLdApi.expand(JsonLdApi.java:997)
>       at 
> com.github.jsonldjava.core.JsonLdProcessor.expand(JsonLdProcessor.java:146)
>       at 
> com.github.jsonldjava.core.JsonLdProcessor.toRDF(JsonLdProcessor.java:482)
>       at org.eclipse.rdf4j.rio.jsonld.JSONLDParser.parse(JSONLDParser.java:68)
>       ... 12 more
> {code}
> html snippet:
> {code:html}
> <script type="application/ld+json">
> {
>   "@context": "http://schema.org/";,
>   "@type": "Product",
>   "name": "test product"
> }
> </script>
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to