Last updated on OCTOBER 11, 2016
Applies to:Oracle Big Data Spatial and Graph - Version 1.1 and later
Information in this document applies to any platform.
The goal of the note is to explain how to read vertices which are created with a string-id and avoid a problem where:
1. The vertices are added using OPG with a string-id (e.g. opg.addVertex( "1" ); ). So getId is going to return string.
2. But after shortestPath calculation vertices became Long. (Not all, first is still String). In this case when the getId method tries to convert Long to Sting it fails. An error is raised like below:
Vertices: 7 string
7 -> Exception in thread "main" java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms