Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: BLAZEGRAPH_2_2_0
    • Component/s: None
    • Labels:
      None

      Description

      When matching variables bound to string literals against remote service Blazegraph throws an exception if a bound value contains a newline. This might be true for other special characters, but I did not test this.

      Steps to reproduce

      1. Create a namespace "foobar"
      2. Insert a triple with a string literal containing a newline:
        INSERT DATA { <a> <b> "a\nb" }
        
      3. Try to match string againt itself by the use of SERVICE call:
        SELECT *
        WHERE {
          ?s ?p ?o
          SERVICE <http://192.168.56.1:9999/blazegraph/namespace/foobar/sparql> {
            ?x ?y ?o
          }
        }
        

      Expected result

      1. ?s == ?x == <a>
      2. ?p == ?y == <b>
      3. ?o == "a\nb"

      Actual result

      SPARQL-QUERY: queryStr=SELECT *
      WHERE {
        ?s ?p ?o
        SERVICE <http://192.168.56.1:9999/blazegraph/namespace/foobar/sparql> {
          ?x ?y ?o
        }
      }
      
      java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.util.concurrent.ExecutionException: org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:834)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: org.openrdf.query.QueryEvaluationException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:188)
      	at info.aduna.iteration.IterationWrapper.hasNext(IterationWrapper.java:68)
      	at org.openrdf.query.QueryResults.report(QueryResults.java:155)
      	at org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:76)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$TupleQueryTask.doQuery(BigdataRDFContext.java:1679)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.innerCall(BigdataRDFContext.java:1536)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:1501)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext$AbstractQueryTask.call(BigdataRDFContext.java:714)
      	... 4 more
      Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1523)
      	at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator._hasNext(BlockingBuffer.java:1710)
      	at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.hasNext(BlockingBuffer.java:1563)
      	at com.bigdata.striterator.AbstractChunkedResolverator._hasNext(AbstractChunkedResolverator.java:365)
      	at com.bigdata.striterator.AbstractChunkedResolverator.hasNext(AbstractChunkedResolverator.java:341)
      	at com.bigdata.rdf.sail.Bigdata2Sesame2BindingSetIterator.hasNext(Bigdata2Sesame2BindingSetIterator.java:134)
      	... 11 more
      Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.relation.accesspath.BlockingBuffer$BlockingIterator.checkFuture(BlockingBuffer.java:1454)
      	... 16 more
      Caused by: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:59)
      	at com.bigdata.rdf.sail.RunningQueryCloseableIterator.close(RunningQueryCloseableIterator.java:73)
      	at com.bigdata.rdf.sail.RunningQueryCloseableIterator.hasNext(RunningQueryCloseableIterator.java:82)
      	at com.bigdata.striterator.ChunkedWrappedIterator.hasNext(ChunkedWrappedIterator.java:197)
      	at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:222)
      	at com.bigdata.striterator.AbstractChunkedResolverator$ChunkConsumerTask.call(AbstractChunkedResolverator.java:197)
      	... 4 more
      Caused by: java.util.concurrent.ExecutionException: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.util.concurrent.Haltable.get(Haltable.java:273)
      	at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:1516)
      	at com.bigdata.bop.engine.AbstractRunningQuery.get(AbstractRunningQuery.java:104)
      	at com.bigdata.rdf.sail.RunningQueryCloseableIterator.checkFuture(RunningQueryCloseableIterator.java:46)
      	... 9 more
      Caused by: java.lang.Exception: task=ChunkTask{query=e36caee2-2e17-42ee-80ff-1613a6b005ba,bopId=4,partitionId=-1,sinkId=6,altSinkId=null}, cause=java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1338)
      	at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTaskWrapper.run(ChunkedRunningQuery.java:897)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at com.bigdata.concurrent.FutureTaskMon.run(FutureTaskMon.java:63)
      	at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkFutureTask.run(ChunkedRunningQuery.java:792)
      	... 3 more
      Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1318)
      	... 8 more
      Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask.doServiceCallWithConstant(ServiceCallJoin.java:351)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask.call(ServiceCallJoin.java:303)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask.call(ServiceCallJoin.java:215)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at com.bigdata.bop.engine.ChunkedRunningQuery$ChunkTask.call(ChunkedRunningQuery.java:1317)
      	... 8 more
      Caused by: java.lang.RuntimeException: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.doServiceCall(ServiceCallJoin.java:757)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.call(ServiceCallJoin.java:616)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.call(ServiceCallJoin.java:552)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	... 3 more
      Caused by: com.bigdata.rdf.sail.webapp.client.HttpException: Status Code=400, Status Line=Bad Request, Response=SPARQL-QUERY: queryStr=
      prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
      
      prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
      
      prefix sesame: <http://www.openrdf.org/schema/sesame#>
      
      prefix owl: <http://www.w3.org/2002/07/owl#>
      
      prefix xsd: <http://www.w3.org/2001/XMLSchema#>
      
      prefix fn: <http://www.w3.org/2005/xpath-functions#>
      
      prefix foaf: <http://xmlns.com/foaf/0.1/>
      
      prefix dc: <http://purl.org/dc/elements/1.1/>
      
      prefix hint: <http://www.bigdata.com/queryHints#>
      
      prefix bd: <http://www.bigdata.com/rdf#>
      
      prefix bds: <http://www.bigdata.com/rdf/search#>
      SELECT  ?x ?y ?o
      WHERE {
      
          ?x ?y ?o
        
      }
      VALUES ( ?o) {
      ( "a
      b" )
      }
      
      java.util.concurrent.ExecutionException: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at java.util.concurrent.FutureTask.report(Unknown Source)
      	at java.util.concurrent.FutureTask.get(Unknown Source)
      	at com.bigdata.rdf.sail.webapp.BigdataServlet.submitApiTask(BigdataServlet.java:281)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doSparqlQuery(QueryServlet.java:636)
      	at com.bigdata.rdf.sail.webapp.QueryServlet.doPost(QueryServlet.java:263)
      	at com.bigdata.rdf.sail.webapp.RESTServlet.doPost(RESTServlet.java:269)
      	at com.bigdata.rdf.sail.webapp.MultiTenancyServlet.doPost(MultiTenancyServlet.java:192)
      	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:769)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      	at org.eclipse.jetty.server.Server.handle(Server.java:497)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)
      	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:610)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:539)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: org.openrdf.query.MalformedQueryException: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:404)
      	at com.bigdata.rdf.sail.webapp.BigdataRDFContext.getQueryTask(BigdataRDFContext.java:2367)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:713)
      	at com.bigdata.rdf.sail.webapp.QueryServlet$SparqlQueryTask.call(QueryServlet.java:653)
      	at com.bigdata.rdf.task.ApiTaskForIndexManager.call(ApiTaskForIndexManager.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	... 1 more
      Caused by: com.bigdata.rdf.sail.sparql.ast.TokenMgrError: Lexical error at line 30, column 5.  Encountered: "\n" (10), after : "\"a"
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilderTokenManager.getNextToken(SyntaxTreeBuilderTokenManager.java:3994)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.jj_ntk(SyntaxTreeBuilder.java:9633)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingSet(SyntaxTreeBuilder.java:1264)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.InlineDataFull(SyntaxTreeBuilder.java:1220)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.DataBlock(SyntaxTreeBuilder.java:1136)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.BindingsClause(SyntaxTreeBuilder.java:1040)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.SelectQuery(SyntaxTreeBuilder.java:378)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.Query(SyntaxTreeBuilder.java:324)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.QueryContainer(SyntaxTreeBuilder.java:212)
      	at com.bigdata.rdf.sail.sparql.ast.SyntaxTreeBuilder.parseQuery(SyntaxTreeBuilder.java:32)
      	at com.bigdata.rdf.sail.sparql.Bigdata2ASTSPARQLParser.parseQuery2(Bigdata2ASTSPARQLParser.java:336)
      	... 8 more
      
      	at com.bigdata.rdf.sail.webapp.client.RemoteRepositoryBase.checkResponseCode(RemoteRepositoryBase.java:102)
      	at com.bigdata.rdf.sail.webapp.client.RemoteRepositoryManager.tupleResults(RemoteRepositoryManager.java:2178)
      	at com.bigdata.rdf.sparql.ast.service.RemoteServiceCallImpl.call(RemoteServiceCallImpl.java:153)
      	at com.bigdata.rdf.sparql.ast.service.RemoteServiceCallImpl.call(RemoteServiceCallImpl.java:51)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.doNonBigdataSesameServiceCall(ServiceCallJoin.java:839)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.doRemoteServiceCall(ServiceCallJoin.java:803)
      	at com.bigdata.bop.controller.ServiceCallJoin$ChunkTask$ServiceCallTask.doServiceCall(ServiceCallJoin.java:717)
      	... 6 more
      

      I found the problem to be in the class AST2SPARQLUtil , where in line 157 the string is inserted without escaping. In the ParseException class there is a method add_escapes that escapes strings according to SparQL string escaping rules. Possible solution would be to move that method to a more sensible location and use it in AST2SPARQLUtil and in ParseException.

        Activity

        Hide
        rag Renat Golubchyk added a comment -

        This issue affects all Blazegraph versions since the time the class AST2SPARQLUtil has been introduced.

        Show
        rag Renat Golubchyk added a comment - This issue affects all Blazegraph versions since the time the class AST2SPARQLUtil has been introduced.
        Hide
        beebs Brad Bebee added a comment -

        igorkim Please triage this one.

        thompsonbryry Alexandre Riazanov

        Show
        beebs Brad Bebee added a comment - igorkim Please triage this one. thompsonbry ry Alexandre Riazanov
        Hide
        igorkim igorkim added a comment -

        A remote call is executed for the service keyword
        com.bigdata.bop.controller.ServiceCallJoin.ChunkTask.ServiceCallTask.doServiceCall(ServiceCall<? extends Object>, IBindingSet[])
        which uses potential solutions while preparing SPARQL query to execute:
        com.bigdata.rdf.sparql.ast.service.RemoteSparql11QueryBuilder.getSparqlQuery(BindingSet[])
        Following function is called to get BindingSet values representation:
        com.bigdata.rdf.sail.webapp.client.AST2SPARQLUtil.toExternal(Literal)
        which does not escape lit.getLabel() on line #157 as mentioned in the issue description above.

        AST2SPARQLUtil.toExternal is called only from Remote SPARQL Builders, so the issue could be fixed by using proper escapes in AST2SPARQLUtil.toExternal.
        Sesame org.openrdf.query.parser.sparql.SPARQLUtil class provides encodeString(label), which does proper escaping for the literals in SPARQL (Per JavaDoc: Encodes the supplied string for inclusion as a 'normal' string in a SPARQL query.)

        Show
        igorkim igorkim added a comment - A remote call is executed for the service keyword com.bigdata.bop.controller.ServiceCallJoin.ChunkTask.ServiceCallTask.doServiceCall(ServiceCall<? extends Object>, IBindingSet[]) which uses potential solutions while preparing SPARQL query to execute: com.bigdata.rdf.sparql.ast.service.RemoteSparql11QueryBuilder.getSparqlQuery(BindingSet[]) Following function is called to get BindingSet values representation: com.bigdata.rdf.sail.webapp.client.AST2SPARQLUtil.toExternal(Literal) which does not escape lit.getLabel() on line #157 as mentioned in the issue description above. AST2SPARQLUtil.toExternal is called only from Remote SPARQL Builders, so the issue could be fixed by using proper escapes in AST2SPARQLUtil.toExternal. Sesame org.openrdf.query.parser.sparql.SPARQLUtil class provides encodeString(label), which does proper escaping for the literals in SPARQL (Per JavaDoc: Encodes the supplied string for inclusion as a 'normal' string in a SPARQL query.)
        Hide
        igorkim igorkim added a comment -
        Show
        igorkim igorkim added a comment - PR: https://github.com/SYSTAP/bigdata/pull/437
        Hide
        igorkim igorkim added a comment -
        Show
        igorkim igorkim added a comment - Additional test per code review: https://github.com/SYSTAP/bigdata/pull/437/files#diff-6e2c56a32cb35c6e624e6ac6a6cdc85b

          People

          • Assignee:
            igorkim igorkim
            Reporter:
            rag Renat Golubchyk
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: