Search code examples
ibm-graph

tree() step results in a StackOverflowError


I always get a java.lang.StackOverflowError when executing a tree step.

Here is an example from the Music Festival sample data:

def g = graph.traversal(); g.V().has("genre", "Folk").out().tree();

Gives me the following error:

Error: Error encountered evaluating script def g = graph.traversal(); g.V().has("genre", "Folk").out().tree(); with reason java.lang.StackOverflowError

I have noticed that the gremlin version on IBM Graph is:

3.0.1-incubating

There have been some other posts stating that there is a bug in this version with respect to the tree step.

At this point I have two questions

  1. Will IBM Graph be upgrading to a version of Gremlin that fixes this issue?
  2. Is there any workaround for getting a tree representation of a traversal path?

Solution

  • @yo3jones yes IBM Graph will be upgrading to a later version of Gremlin that fixes that. For now the only suggestion the folks in TP are making is to use path and restruct the result as a tree on the client side. Checkout this JIRA https://issues.apache.org/jira/browse/TINKERPOP-732