haoming06 commented on issue #1871:
URL:
https://github.com/apache/incubator-hugegraph/issues/1871#issuecomment-1124739962
感谢~ gremlin-client已经请求成功
用java gremlin-core 、gremlin-driver请求报错
remote-objects.yaml配置
`hosts: [192.168.100.222]
port: 8182
serializer: {
className:
org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0,
config: {
serializeResultToString: false
}
}`
java 代码
`
Cluster cluster = Cluster.build(new
File("./conf/remote-objects.yaml")).create();
GraphTraversalSource g =
traversal().withRemote(DriverRemoteConnection.using(cluster,"g"));
System.out.println(g.V().count().toList());
`
`Exception in thread "main" java.util.concurrent.CompletionException:
org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Could not
deserialize the JSON value as required. Nested exception:
org.apache.tinkerpop.shaded.jackson.core.JsonParseException: Unexpected
character ('s' (code 115)): was expecting double-quote to start field name
at [Source: (String)"{sourceInstructions=[], stepInstructions=[{operator=V,
arguments=[]}, {operator=count, arguments=[]}], instructions=[{operator=V,
arguments=[]}, {operator=count, arguments=[]}], bindings={}}"; line: 1, column:
3]
at [Source: (String)"{sourceInstructions=[], stepInstructions=[{operator=V,
arguments=[]}, {operator=count, arguments=[]}], instructions=[{operator=V,
arguments=[]}, {operator=count, arguments=[]}], bindings={}}"; line: 1, column:
1]
at
java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:375)
at
java.util.concurrent.CompletableFuture.join(CompletableFuture.java:1947)
at org.apache.tinkerpop.gremlin.driver.ResultSet.one(ResultSet.java:119)
at
org.apache.tinkerpop.gremlin.driver.ResultSet$1.hasNext(ResultSet.java:171)
at
org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:178)
at
org.apache.tinkerpop.gremlin.driver.ResultSet$1.next(ResultSet.java:165)
at
org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:146)
at
org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal$TraverserIterator.next(DriverRemoteTraversal.java:131)
`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]