Deserializer for "janusgraph:RelationIdentifier" not found


bill.poole@...
 

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


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
Gesendet: Donnerstag, 25. August 2022 20:54
An: janusgraph-users@...
Betreff: [janusgraph-users] Deserializer for "janusgraph:RelationIdentifier" not found

 

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


bill.poole@...
 

Hello again – I’m responding to this thread. I saw the response to my original email via the web interface, but never received it by email, so cannot send this as a reply to that email.

 

In my original email I said:

 

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());

 

Florian Hockmann was very helpful to reply with:

 

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.

 

However, I was actually using the JanusGraph.Net client – specifically version 0.4.1, the latest available on NuGet.

 

Am I not using JanusGraph.Net correctly?

 

Regards,

Bill


Florian Hockmann
 

But you are subscribed to the list and you are getting other messages here?

 

Am I not using JanusGraph.Net correctly?

 

Can you please show how you are creating the client and the GraphTraversalSource? If you are using the JanusGraphClientBuilder, then it should be using the JanusGraph.Net serializers.

 

Von: janusgraph-users@... <janusgraph-users@...> Im Auftrag von bill.poole via lists.lfaidata.foundation
Gesendet: Freitag, 26. August 2022 18:29
An: janusgraph-users@...
Betreff: [janusgraph-users] Deserializer for "janusgraph:RelationIdentifier" not found

 

Hello again – I’m responding to this thread. I saw the response to my original email via the web interface, but never received it by email, so cannot send this as a reply to that email.

 

In my original email I said:

 

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());

 

Florian Hockmann was very helpful to reply with:

 

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.

 

However, I was actually using the JanusGraph.Net client – specifically version 0.4.1, the latest available on NuGet.

 

Am I not using JanusGraph.Net correctly?

 

Regards,

Bill