I am trying to fetch edge property value between two vertices and getting below exception
java.lang.ClassCastException: java.lang.String cannot be cast to scala.runtime.Nothing$
Env: Titan InMemory
Code :
val age = Key[Int]("age")
A ---("knows",age -> 10) --> B
Gremlin query:
graph.traversal().V().has("ID", "A").bothE("knows").as("x").otherV()
.has("ID", "B").select("x").properties("age").headOption().get
output : p[age->10]
graph.traversal().V().has("ID", "A").bothE("knows").as("x").otherV()
.has("ID", "B").select("x").label().head()
output : knows
graph.traversal().V().has("ID", "A").bothE("knows").as("x").otherV()
.has("ID", "B").select("x").values("age").head()
Output:
java.lang.ClassCastException: java.lang.String cannot be cast to scala.runtime.Nothing$
Any idea when i try to fetch property value , i am getting this error
Same works with gremlin console http://gremlinbin.com/bin/view/58044fa931772