Error While returning relation
VINAYAK179 opened this issue · 17 comments
Hello,
I am executing an simple query as follows :
Match (n)-[r]-(x) return r
This query is giving the following error:
java.util.concurrent.CompletionException: io.netty.handler.codec.DecoderException: org.apache.tinkerpop.gremlin.driver.ser.SerializationException: org.apache.tinkerpop.shaded.kryo.KryoException: Encountered unregistered class ID: 65536
If we return n,x then it works. Please help as soon as possible.
Thank You
Hello @VINAYAK179,
I don't have enough details, but I might guess that you are using JanusGraph, and have not configured JanusGraphIoRegistry (see conf/remote-objects.yaml) for the client.
If my guess is wrong, please provide details on how you are connecting and what is your target server.
Ok, in the console, when you are connecting to server:
:remote connect opencypher.gremlin conf/cypher-server.yaml
Does your conf/cypher-server.yaml
contain JanusGraphIoRegistry
as it required for JanusGraph?
Same is required for Java client configuration.
I am using remote.yaml of janusgraph-0.2.3-hadoop2 for connecting to the gremlin server . I checked server configurations JanusGraphIoRegistry is present . I think its due to version problem for GryoMessageSerializerV1d0. Can you please confirm the same. Also can we store more than one schema or graph using janusgraph and how to do it?
Janus Graph 0.2.x is known to have issues (see #254). Is it possible for you to upgrade to 0.3.x version?
I know that 0.4.0 was released today, but have not tested it with Cypher for Gremlin yet.
Yes, I can migrate. Can we have two versions of JanusGraph working on a system simultaneously. I know the issue #254 hence I am using an external gremlin console for connection. Its returning vertexes, so same must be the case for edges. I have some more questions can I contact you on some other platform.
Can you try gremlin query to return edges: g.E()
? Does it produce the same error?
I have some more questions can I contact you on some other platform.
Please use Github issues for that.
g.E() is working after establishing the remote connection. Does edges are also taken into consideration while translating the query
Does edges are also taken into consideration while translating the query
yes
Sounds strange. Could you please show:
- Console log executing
g.E()
, and then Cypher query producing error - Contents of
yaml
files
Sorry there was mistake from my side.
Command to establish remote connection for executing gremlin query
:remote connect tinkerpop.server conf/remote.yaml
:> g.V() and :>g.E() both not working
Command to establish remote connection for executing cypher query
:remote connect opencypher.gremlin conf/remote.yaml translate gremlin33x
This works for Vertices but not for edges.
remote.yaml file is as follows :
hosts: [localhost]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: false }}
Ok, so JanusGraphIoRegistry is not configured in conf/remote.yaml
. File should look like this:
hosts: [localhost]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
I changed the remote file gives an error
==>Error during 'connect' - Could not establish serializer - java.lang.ClassNotFoundException: org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry
Do we need to change some other files
The above change was in janusgraph . I made the change in cypher-gremlin-console, it works for vertex not for edges
This is JanusGraph specific. JanusGraph requires custom JanusGraphIoRegistry
for serialization of its classes.
Simplest way to get this dependency is to use console bundled in JanusGraph distribution.
In Java API dependency to org.janusgraph:janusgraph-core is required for this to work.
I tried this too but its not working. I will migrate to version 0.3.2 and then try and hope its works.
Also I am trying to create multiple graphs but not able to configure ConfiguredGraphFactory. The error is as follows:
java.lang.RuntimeException: org.janusgraph.graphdb.management.utils.ConfigurationManagementGraphNotEnabledException: Please add a key named "ConfigurationManagementGraph" to the "graphs" property in your YAML file and restart the server to be able to use the functionality of the ConfigurationManagementGraph class.
I tried all the material on web but not working. Can you please help me with it.
Question about ConfiguredGraphFactory
is clearly related to JanusGraph configuration. Please address it to JanusGraph community channels.
Closing issue after a week of inactivity. Don't hesitate to open a new issue if you have any more questions.