Re: Deserializer for "janusgraph:RelationIdentifier" not found
Florian Hockmann
Hi Bill,
the error is telling you that Gremlin.Net cannot deserialize the GraphSON type “janusgraph:RelationIdentifier”. That’s because it’s a JanusGraph specific type and Gremlin.Net doesn’t know anything about such types.
That is why we’ve built JanusGraph.Net: https://github.com/JanusGraph/janusgraph-dotnet/ It’s a .NET library that simply extends Gremlin.Net for such JanusGraph specific types like RelationIdentifier. Switching to that library should solve these problems. It also make it easy to always have a version of the .NET driver that is compatible with your JanusGraph Server version.
If you don’t want to use JanusGraph.Net, then you could also try working around this. You simply need to ensure that the traversal doesn’t return a JanusGraph specific type. In your case, you don’t want anything back any way, so you can simply append a `constant(1)` which returns ‘1’ that is then ignored by the driver since you’re using `Iterate()`:
await gtx.AddV("person").AddE("whatever").Constant(1).Promise(t => t.Iterate());
Regards, Florian
Von: janusgraph-users@... <janusgraph-users@...> Im Auftrag von bill.poole via lists.lfaidata.foundation
Hi All – I’m getting error “Deserializer for "janusgraph:RelationIdentifier" not found” when executing the below traversal using JanusGraph.Net:
await gtx.AddV("person").AddE("whatever").Promise(t => t.Iterate());
The stack trace:
System.InvalidOperationException: Deserializer for "janusgraph:RelationIdentifier" not found at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ReadValueOfType(JsonElement typedValue, String graphSONType) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ToObject(JsonElement graphSon) at Gremlin.Net.Structure.IO.GraphSON.EdgeDeserializer.Objectify(JsonElement graphsonObject, GraphSONReader reader) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ReadValueOfType(JsonElement typedValue, String graphSONType) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ToObject(JsonElement graphSon) at Gremlin.Net.Structure.IO.GraphSON.TraverserReader.Objectify(JsonElement graphsonObject, GraphSONReader reader) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ReadValueOfType(JsonElement typedValue, String graphSONType) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ToObject(JsonElement graphSon) at Gremlin.Net.Structure.IO.GraphSON.ListSerializer.Objectify(JsonElement graphsonObject, GraphSONReader reader) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ReadValueOfType(JsonElement typedValue, String graphSONType) at Gremlin.Net.Structure.IO.GraphSON.GraphSONReader.ToObject(JsonElement graphSon) at Gremlin.Net.Structure.IO.GraphSON.GraphSONMessageSerializer.DeserializeMessageAsync(Byte[] message) at Gremlin.Net.Driver.Connection.HandleReceivedAsync(Byte[] received) at Gremlin.Net.Driver.Connection.ReceiveMessagesAsync() at Gremlin.Net.Driver.ProxyConnection.SubmitAsync[T](RequestMessage requestMessage) at Gremlin.Net.Driver.GremlinClient.SubmitAsync[T](RequestMessage requestMessage) at Gremlin.Net.Driver.Remote.DriverRemoteConnection.SubmitBytecodeAsync(Guid requestid, Bytecode bytecode) at Gremlin.Net.Driver.Remote.DriverRemoteConnection.SubmitAsync[S,E](Bytecode bytecode) at Gremlin.Net.Process.Remote.RemoteStrategy.ApplyAsync[S,E](ITraversal`2 traversal) at Gremlin.Net.Process.Traversal.DefaultTraversal`2.ApplyStrategiesAsync() at Gremlin.Net.Process.Traversal.DefaultTraversal`2.Promise[TReturn](Func`2 callback)
I get this error any time I add any edge. Any help would be greatly appreciated!
-Bill |
|