Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-1110

Server does not generate RDR aware JSON for RDF/SPARQL RESULTS

    Details

      Description

      We need a test case for this as well (in the NSS test suite).

      curl -X POST http://localhost:8080/bigdata/namespace/RDR/sparql --data-urlencode 'query=CONSTRUCT  WHERE { ?s ?p ?o }' -H 'Accept:application/json'
      SPARQL-QUERY: queryStr=CONSTRUCT  WHERE { ?s ?p ?o }
      java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.openrdf.rio.RDFHandlerException: com.fasterxml.jackson.core.JsonGenerationException: Current context not an object but ARRAY
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:516)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:191)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:237)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:144)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:568)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:199)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:462)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.openrdf.rio.RDFHandlerException: com.fasterxml.jackson.core.JsonGenerationException: Current context not an object but ARRAY
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:707)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:1)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:67)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at com.bigdata.rdf.task.AbstractApiTask.submitApiTask(AbstractApiTask.java:315)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:220)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:513)
      	... 25 more
      Caused by: java.util.concurrent.ExecutionException: org.openrdf.rio.RDFHandlerException: com.fasterxml.jackson.core.JsonGenerationException: Current context not an object but ARRAY
      	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
      	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1296)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      	... 1 more
      Caused by: org.openrdf.rio.RDFHandlerException: com.fasterxml.jackson.core.JsonGenerationException: Current context not an object but ARRAY
      	at com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONWriterForConstruct.endRDF(BigdataSPARQLResultsJSONWriterForConstruct.java:87)
      	at org.openrdf.query.QueryResults.report(QueryResults.java:201)
      	at org.openrdf.repository.sail.SailGraphQuery.evaluate(SailGraphQuery.java:114)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$GraphQueryTask.doQuery(BigdataRDFContext.java:1467)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask$SparqlRestApiTask.call(BigdataRDFContext.java:1238)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask$SparqlRestApiTask.call(BigdataRDFContext.java:1)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:67)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      	at com.bigdata.rdf.task.AbstractApiTask.submitApiTask(AbstractApiTask.java:315)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1294)
      	... 5 more
      Caused by: com.fasterxml.jackson.core.JsonGenerationException: Current context not an object but ARRAY
      	at com.fasterxml.jackson.core.base.GeneratorBase._reportError(GeneratorBase.java:444)
      	at com.fasterxml.jackson.core.json.WriterBasedJsonGenerator.writeEndObject(WriterBasedJsonGenerator.java:176)
      	at com.bigdata.rdf.rio.json.SPARQLJSONWriterBase.endDocument(SPARQLJSONWriterBase.java:431)
      	at com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONWriter.endDocument(BigdataSPARQLResultsJSONWriter.java:1)
      	at com.bigdata.rdf.rio.json.BigdataSPARQLResultsJSONWriterForConstruct.endRDF(BigdataSPARQLResultsJSONWriterForConstruct.java:85)
      	... 14 more
      

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        Resolved 9275df0ea69b73240b9503112d3095dba933324b

        Show
        bryanthompson bryanthompson added a comment - Resolved 9275df0ea69b73240b9503112d3095dba933324b

          People

          • Assignee:
            mikepersonick mikepersonick
            Reporter:
            bryanthompson bryanthompson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: