Hi,
We recently upgraded from tinkergraph-gremlin-3.4.6 to tinkergraph-gremlin-3.5.1 as part of janusgraph-0.6.0 upgrade . After this upgrade, one of our log stament started throwing exception
com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion (StackOverflowError) (through reference chain: org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal["steps"]>java.util.Collections$UnmodifiableRandomAccessList[0]>org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphStep["traversal"]>org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.DefaultGraphTraversal["steps"]>....
Output which is causing infinite recursion is as below .
[
{
"labels": [
],
"id": "0.0.0()",
"traversal": {
"graph": {
"present": true
},
"steps": [
{
"labels": [
],
"id": "0.0.0()",
"traversal": {
"graph": {
"present": true
},
"steps": [
{
"labels": [
],
"id": "0.0.0()",
"traversal": {
"graph": {
"present": true
},
"steps": [...
As a workaround, we fixed this by manually collecting steps by index upto traversal.getSteps().size()
for(int index=0; index <traversal.getSteps().size(); index++) {
steps.add(traversal.getSteps().get(index));
}
Can anybody help understand what exactly changed after tinkergraph-gremlin-3.4.6 which is causing this and is there better workaround ?