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

Peter Ansell commented on ANY23-303:
------------------------------------

I upgraded the version of jsonld-java to 0.10.0 (previously was inherited 
through RDF4J, now managed explicitly in the Any23 parent pom). If you are 
still having an issue with schema.org let me know and I will try further to 
replicate it, but I couldn't replicate this myself today using the 0.8.3 
version that was being used until I changed it just now. 

I was able to replicate the issue a few months ago, before 0.10.0 was released, 
and had a workaround using the Java URLConnection API which did work, but they 
changed things again just before that version was released and they went back 
to supporting the httpclient method that is used for everything else inside of 
jsonld-java.

> 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