1
votes

I follow this example;

https://github.com/JanusGraph/janusgraph/tree/master/janusgraph-examples/example-remotegraph

and I would like to debug this project, I configured(HBase+Solr) and run Janus Graph server with

$JANUSGRAPH_HOME/bin/gremlin-server.sh $JANUSGRAPH_HOME/conf/gremlin-server/gremlin-server.yaml

command. I passed this argument to IDEA via Run Configuration > Program Arguments

[Project Home]/conf/jgex-remote.properties

my jgex-remote.properties file is:

gremlin.remote.remoteConnectionClass=org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteConnection
# cluster file has the remote server configuration
gremlin.remote.driver.clusterFile=[Project Home]/conf/remote-objects.yaml
# source name is the global graph traversal source defined on the server
gremlin.remote.driver.sourceName=g 

and my remote-objects.yaml file includes:

hosts: [127.0.0.1]
port: 8182
serializer: {
    className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0,
    config: {
        ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry]
    }
}

It tries to run this command:

cluster = Cluster.open(conf.getString("gremlin.remote.driver.clusterFile"));

And throws this exception:

Exception in thread "main" java.lang.NoSuchFieldError: V3_0 at org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0.(GryoMessageSerializerV3d0.java:41) at org.apache.tinkerpop.gremlin.driver.ser.Serializers.simpleInstance(Serializers.java:77) at org.apache.tinkerpop.gremlin.driver.Cluster$Builder.(Cluster.java:472) at org.apache.tinkerpop.gremlin.driver.Cluster$Builder.(Cluster.java:469) at org.apache.tinkerpop.gremlin.driver.Cluster.getBuilderFromSettings(Cluster.java:167) at org.apache.tinkerpop.gremlin.driver.Cluster.build(Cluster.java:159) at org.apache.tinkerpop.gremlin.driver.Cluster.open(Cluster.java:233) at com.ets.dataplatform.init.RemoteGraphApp.openGraph(RemoteGraphApp.java:72) at com.ets.dataplatform.init.GraphApp.runApp(GraphApp.java:290) at com.ets.dataplatform.init.RemoteGraphApp.main(RemoteGraphApp.java:195)

It is not meaningful for me.

Thanks in advance.

1
Are you sure that you are using the config remote-objects.yaml to create the Cluster? The exception says that it tries to use GryoMessageSerializerV3d0 but your config contains GryoMessageSerializerV1d0. I don't think that JanusGraph supports Gryo V3 so you really should make sure that you're using a lower version.Florian Hockmann
Hi, @florian-hockmann thanks for your comment. Yes, conf.getString("gremlin.remote.driver.clusterFile") expression getting the correct remote-objects.yaml file. Like you said it includes GryoMessageSerializerV1d0 but error getting from GryoMessageSerializerV3d0 it is not sensible for me.msertacturkel

1 Answers

2
votes

I would try to align your versions. I assume that you are using JanusGraph 0.2.0. If you look at the pom.xml for that version you'll see that it is bound to TinkerPop 3.2.6:

https://github.com/JanusGraph/janusgraph/blob/v0.2.0/pom.xml#L68

Change to that version in your application and see if the connection works. Taking that approach should not only fix your problem but also ensure that you don't run into other incompatibilities. That is not to say that you can't configure later versions of TinkerPop to work with 3.2.6, but it requires a bit more configuration and you have to be aware of minor changes that might affect how certain operations might behave.