I'm receiving the following error while using the @GremlinGroovy annotation associated with tinkerpop's frames.
java.lang.ClassCastException: com.thinkaurelius.titan.graphdb.relations.CacheEdge cannot be cast to com.tinkerpop.blueprints.Vertex
at com.tinkerpop.frames.structures.FramedVertexIterable$1.next(FramedVertexIterable.java:36)
at com.tinkerpop.frames.annotations.gremlin.GremlinGroovyAnnotationHandler.processVertex(GremlinGroovyAnnotationHandler.java:75)
at com.tinkerpop.frames.annotations.gremlin.GremlinGroovyAnnotationHandler.processElement(GremlinGroovyAnnotationHandler.java:114)
at com.tinkerpop.frames.annotations.gremlin.GremlinGroovyAnnotationHandler.processElement(GremlinGroovyAnnotationHandler.java:30)
at com.tinkerpop.frames.FramedElement.invoke(FramedElement.java:83)
at com.sun.proxy.$Proxy81.getProxyCandidateEdgeFromPersonUuid(Unknown Source)
at com.company.prod.domain.Person$Impl.toImpl(Person.java:100)
....
The following line causes the error:
FooEdge fe = foo.getFooEdgeFromUuid(this.getUuid());
Which is calling this method:
@GremlinGroovy("it.outE('has').filter{it.inV().has('uuid', T.eq, uuid).hasNext()}")
FooEdge getFooEdgeFromUuid(@GremlinParam("uuid") String uuid);
I've also tried the following traversal (which causes the same error):
@GremlinGroovy("it.out('has').has('uuid', T.eq, uuid).inE('has')")
However, when I open a gremlin shell to test out the same exact traversal - everything works out just fine. Any thoughts on what may be causing the issue?