Deserializing of Vertex ID with Custom String value

Hi,

I've come across an issue with deserialization from users enabling custom vertex ID values and types as documented on https://docs.janusgraph.org/advanced-topics/custom-vertex-id/.
Below is a sample GraphSON serialization error highlighting the issue, where a vertex has a custom string ID value (U933779):
java.lang.IllegalArgumentException: Invalid id - each token expected to be a number
 at [Source: (byte[])"{"requestId":"171a7723-7b62-4131-8035-e735ff368ffd","status":{"message":"","code":200,"attributes":{"@type":"g:Map","@value":["host","localhost"]}},"result":{"data":{"@type":"g:List","@value":[{"@type":"g:Vertex","@value":{"id":"U933779","label":"user","properties":{"phone":[{"@type":"g:VertexProperty","@value":{"id":{"@type":"janusgraph:RelationIdentifier","@value":{"relationId":"9g3yj-SU933779-8p1"}},"value":"[REDACTED]","label":"phone","properties":{"metadata":"{}"}}}],"profile"[truncated 645 bytes]; line: 1, column: 415]

The part that confuses me is the RelationIdentifier class as defined in JG 1.0 (https://github.com/JanusGraph/janusgraph/blob/12708188397f69616adddc933e539e841af409e4/janusgraph-driver/src/main/java/org/janusgraph/graphdb/relations/RelationIdentifier.java#L31) still defines the id value as a long.
My question is, for custom vertex id values, what is the correct approach to deserializing ID values? We've tried this with multiple different types of serializers to no avail.
GitHub
JanusGraph: an open-source, distributed graph database - JanusGraph/janusgraph
Solution
Hey, turns out it was a mismatch between driver and server version due to the user being on an older version of G.V(), i need to remember to make this the first thing i check 😅
Was this page helpful?