0 Replies Latest reply on Dec 13, 2013 8:35 PM by eugen_nw

    How to fix com.sun.istack.SAXException2 : A cycle is detected in the object graph. This will cause infinitely deep XML: ProcessDefinition -> ProcessDefinition?

    eugen_nw

      The full type of the objects in question is org.jbpm.graph.def.ProcessDefinition.  I am encountering this error while XML serializing a response from a CXF web server, more precisely while serializing an instance of org.jbpm.graph.def.Node class: as this class inherits from org.jbpm.graph.def.GraphElement, it tries to serialize the GraphElement.processDefinition field as well and by doing so it won't take long until it finds the identical processDefinition instance referenced again.

       

      One quick solution would be to use reflection to traverse recursively all properties of my class and whenever I encounter a field that inherits from the org.jbpm.graph.def.GraphElement, to set its processDefinition field to null.  Did anyone fix this problem in a less laborious manner?

       

      Thank you,  eugen_nw