Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-1178

JSON-LD https @contexts does not work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • Jena 3.0.0, Jena 3.0.1, Jena 3.1.0
    • Jena 3.1.1
    • ARQ, RIOT

    Description

      I am unable to use https JSON-LD @contexts - something with https is not working. Basically this breaks anything at https://w3id.org/ which is popular in JSON-LD community.

      This was broken in 3.0.0, 3.0.1 and 3.1.0 RC3.

      Upgrading JSON-LD Java to 0.8.2 and corresponding httpclient/httpclient-cache/httpcore seems to fix the issue.

      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "https://w3id.org/bundle/context.json", "aggregates":
      "http://example.com/soup" }
      17:04:59 ERROR riot                 :: invalid remote context:
      https://w3id.org/bundle/context.json
      

      Trying to follow the redirection does not help, as it goes to https as well:

      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "https://rawgit.com/researchobject/specifications/gh-pages/bundle/context.json",
      "aggregates": "http://example.com/soup" }
      17:05:59 ERROR riot                 :: invalid remote context:
      https://rawgit.com/researchobject/specifications/gh-pages/bundle/context.json
      

      Using http instead of https works - so the context is not at fault:

      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "http://rawgit.com/researchobject/specifications/gh-pages/bundle/context.json",
      "aggregates": "http://example.com/soup" }
      _:B9c444c8e486c7be3e4a49bbaaff22bc8
      <http://www.openarchives.org/ore/terms/aggregates>
      <http://example.com/soup> .
      

      So I tried with another w3id-identified context, which also fails:

      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "https://w3id.org/payswarm/v1", "paymentMethod": "Visa" }
      17:07:45 ERROR riot                 :: invalid remote context:
      https://w3id.org/payswarm/v1
      

      I get the same errors with 3.0.0 and 3.0.1, so perhaps this is not a
      blocker for this RC.

      Dropping in lib/httpclient-4.5.1.jar lib/httpclient-cache-4.5.1.jar
      lib/httpcore-4.4.4.jar lib/jsonld-java-0.8.2.jar

      fixes this issue for both cases:

      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "https://w3id.org/payswarm/v1", "paymentMethod": "Visa" }
      _:Bbd3ab47b6dc78802bd11266c6dff7b5c
      <https://w3id.org/commerce#paymentMethod>
      <https://w3id.org/commerce/creditcard#Visa> .
      
      stain@biggie:~/Downloads/95/apache-jena-3.1.0$ bin/riot --syntax jsonld
      {"@context": "https://w3id.org/bundle/context.json", "aggregates":
      "http://example.com/soup" }
      _:B4c8067a2a952151f5b2251f8a35c53dc
      <http://www.openarchives.org/ore/terms/aggregates>
      <http://example.com/soup> .
      

      Attachments

        Issue Links

          Activity

            People

              andy Andy Seaborne
              stain Stian Soiland-Reyes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: