-
Notifications
You must be signed in to change notification settings - Fork 9
Description
testAdminCon.hasStatement(john, homeTel, johnhomeTel, false) generates the following ASK query which is incorrect syntactically. This occurs only when the context is not specified or if one of the context is explicitly specified as null.
Scenarios:
- testAdminCon.hasStatement(john, homeTel, johnhomeTel, false)
- testAdminCon.hasStatement(john, homeTel, johnhomeTel, false, null)
- testAdminCon.hasStatement(john, homeTel, johnhomeTel, false, null, dirgraph)
- testAdminCon.hasStatement(st1, false);
- testWriterCon.hasStatement(st1, false, null);
ASK { http://marklogicsparql.com/id#1111 http://marklogicsparql.com/addressbook#homeTel "1.11111111E8"@http://www.w3.org/2001/xmlschema#double }
org.openrdf.repository.RepositoryException: org.openrdf.query.QueryEvaluationException: Local message: failed to apply resource at /graphs/sparql: Bad Request. Server Message: XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected , expecting }
at com.marklogic.semantics.sesame.MarkLogicRepositoryConnection.hasStatement(MarkLogicRepositoryConnection.java:348)
at com.marklogic.sesame.functionaltests.MarkLogicRepositoryConnectionTest.testGetStatementsInSingleContext(MarkLogicRepositoryConnectionTest.java:1642)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.openrdf.query.QueryEvaluationException: Local message: failed to apply resource at /graphs/sparql: Bad Request. Server Message: XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected , expecting }
at com.marklogic.semantics.sesame.query.MarkLogicBooleanQuery.evaluate(MarkLogicBooleanQuery.java:59)
at com.marklogic.semantics.sesame.MarkLogicRepositoryConnection.hasStatement(MarkLogicRepositoryConnection.java:342)
... 27 more
Caused by: com.marklogic.client.FailedRequestException: Local message: failed to apply resource at /graphs/sparql: Bad Request. Server Message: XDMP-UNEXPECTED: (err:XPST0003) Unexpected token syntax error, unexpected , expecting }
at com.marklogic.client.impl.JerseyServices.checkStatus(JerseyServices.java:4598)
at com.marklogic.client.impl.JerseyServices.postResource(JerseyServices.java:3492)
at com.marklogic.client.impl.JerseyServices.executeSparql(JerseyServices.java:5606)
at com.marklogic.client.impl.SPARQLQueryManagerImpl.executeQueryImpl(SPARQLQueryManagerImpl.java:101)
at com.marklogic.client.impl.SPARQLQueryManagerImpl.executeQueryImpl(SPARQLQueryManagerImpl.java:94)
at com.marklogic.client.impl.SPARQLQueryManagerImpl.executeAsk(SPARQLQueryManagerImpl.java:140)
at com.marklogic.semantics.sesame.client.MarkLogicClientImpl.performBooleanQuery(MarkLogicClientImpl.java:225)
at com.marklogic.semantics.sesame.client.MarkLogicClient.sendBooleanQuery(MarkLogicClient.java:125)
at com.marklogic.semantics.sesame.query.MarkLogicBooleanQuery.evaluate(MarkLogicBooleanQuery.java:51)
... 28 more