Thank you Marc,
I was able to reproduce your sample by console: :remote connect tinkerpop.server conf/remote.yaml session # it is GryoMessageSerializerV3d0 - no problem here, but must have serializeResultToString: true
:remote connect tinkerpop.server conf/remote-graph-binary.yaml session
:> g.V().properties("some") ==> Server error - Error during serialization: java.lang.IllegalStateException.
:> g.V().properties("some").hasNext() => true, it is actually working in this context, where server testing the results, not the client after serialization.
It is fine when "remote-graph-binary.yaml" configuration is equipped with serializeResultToString: true.
That hint should indicate that our server is different that the driver we use in java to remote access, but with more debugging I cannot say where is it... We run JanusGraph services through "bin/gremlin-server-websoc.sh", that suppose to run new Binary Driver with gremlin-server-websoc.yaml (+serializeResultToString: true). Then we getting remote access from Java by connection with
MessageSerializer<?> serializer = new GraphBinaryMessageSerializerV1(typeSerializerRegistry);
To be sure, we have true for serializeResultToString in the configuration, we even modified that on fly:
final Map<String, Object> cfg = new HashMap<>(); cfg.put("serializeResultToString",true); serializer.configure(cfg, null);
With serializeResultToString(true) we have the same exception IllegalStageException as initially described, with (false) it is faling everywhere, on simple command like:
GraphTraversal<Vertex, Vertex> t = g.V().hasLabel(label).has(property, value);
if (t.hasNext()) { // java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.tinkerpop.gremlin.process.remote.traversal.RemoteTraverser
so for serializeResultToString(true), all is fine, except "gv().properties()",... somehow we have good driver config for remote access.
Regards, Chris