I am getting the same errors you got but the fix is not doing it for me.
```yaml
hosts: [localhost]
port: 8182
serializer:
className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0
config:
ioRegistries:
- org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistryV3d0
- org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry
```
```text
Exception in thread "main" java.util.concurrent.CompletionException:
org.apache.tinkerpop.gremlin.driver.exception.ResponseException:
Error during serialization:
Class is not registered: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
Note: To register this class use:
kryo.register(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph.class);
at java.base/java.util.concurrent.CompletableFuture.reportJoin(CompletableFuture.java:412)
```
Meanwhile the groovy-gremlin-client works fine and it makes no mention of the TinkerIoRegistryV3d0.
toggle quoted message
Show quoted text
On Friday, April 6, 2018 at 8:30:07 PM UTC-5 ri...@... wrote:
I was able to get it to work by including both JanusGraph and TinkerPop IoRegistries on both server and client
Tinkerpop 3.2.6 on (Janus 0.2.0) gremlin server and client
gremlin-server.yaml
...
serializers:
- { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry,org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
...
remote-objects.yaml
hosts: [127.0.0.1]
port: 8182
serializer: {
className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0,
config: {
ioRegistries: [org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerIoRegistry,org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry]
}
}
If I include only TinkIoRegistry, it complains about not being able to handle certain JanusGraph classes. If I just include JanusGraphIoRegistry, it complains about not being able to handle certain Tinkerpop classes.
Thanks for your help, Stephen
On Thursday, April 5, 2018 at 5:01:12 PM UTC-5, John Ripley wrote:
I am connecting to a remote JanusGraph 0.20 instance from Java. My client is using Tinkerpop 3.2.6. I can do all the standard stuff, return vertices, edges, etc.
When I try to build a 2 generation subgraph in starting from a known seed
Object o = g.V().has("id", 1).repeat(__.bothE().subgraph("subGraph").outV()).times(2).cap("subGraph").next();
I get the following exception:
org.apache.tinkerpop.gremlin.driver.exception.ResponseException: Error during serialization: Class is not registered: org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph
Note: To register this class use: kryo.register(org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph.class);
at org.apache.tinkerpop.gremlin.driver.Handler$GremlinResponseHandler.channelRead0(Handler.java:246) ~[gremlin-driver-3.3.1.jar:3.3.1]
...
This same line works fine in the gremlin console.
gremlin> sg = g.V().has('id', 1).repeat(bothE().subgraph('subGraph').bothV()).times(3).cap('subGraph').next()
==>tinkergraph[vertices:4 edges:4]
I am using the out of the box JanusGraph 0.20 gremlin-server.yaml and remote-objects.yaml