Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21693

JSONException: There is a cycle in the hierarchy!

      @stephenconnolly has seen this personally and others have reported it as well. Needs better diagnosis.

      net.sf.json.JSONException: There is a cycle in the hierarchy!
      	at net.sf.json.util.CycleDetectionStrategy$StrictCycleDetectionStrategy.handleRepeatedReferenceAsObject(CycleDetectionStrategy.java:97)
      	at net.sf.json.JSONObject._fromBean(JSONObject.java:600)
      	at net.sf.json.JSONObject.fromObject(JSONObject.java:169)
      	at net.sf.json.AbstractJSON._processValue(AbstractJSON.java:250)
      	at net.sf.json.JSONObject._processValue(JSONObject.java:2599)
      	at net.sf.json.JSONObject.processValue(JSONObject.java:2665)
      	at net.sf.json.JSONObject.setInternal(JSONObject.java:2680)
      	at net.sf.json.JSONObject.setValue(JSONObject.java:1376)
      	at net.sf.json.JSONObject.defaultBeanProcessing(JSONObject.java:708)
      	at net.sf.json.JSONObject._fromBean(JSONObject.java:642)
      	at net.sf.json.JSONObject.fromObject(JSONObject.java:169)
      	at org.kohsuke.stapler.HttpResponseRenderer$Default.handleJavaScriptProxyMethodCall(HttpResponseRenderer.java:89)
      	at org.kohsuke.stapler.HttpResponseRenderer$Default.generateResponse(HttpResponseRenderer.java:64)
      	at org.kohsuke.stapler.Function.renderResponse(Function.java:112)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:614)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:587)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:218)
      

          [JENKINS-21693] JSONException: There is a cycle in the hierarchy!

          Jesse Glick added a comment -

          Attaching a demo plugin which produces this kind of error.

          Jesse Glick added a comment - Attaching a demo plugin which produces this kind of error.

          Jesse Glick added a comment -

          Pushed better diagnostics to Stapler 1.224. When that gets integrated to core, we can track down the guilty plugin.

          Jesse Glick added a comment - Pushed better diagnostics to Stapler 1.224. When that gets integrated to core, we can track down the guilty plugin.

          Jesse Glick added a comment -

          In 1.561.

          Jesse Glick added a comment - In 1.561.

          Jesse Glick added a comment -

          Got this from pending changes in script-security:

          failed to serialize net.sf.json.JSONException: java.lang.reflect.InvocationTargetException for /jenkins/$stapler/bound/…/getClasspathRenderInfo given [org.kohsuke.stapler.bind.BoundObjectTable@6ef63dd5, org.kohsuke.stapler.bind.BoundObjectTable$Table@4e78f607, org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval@2ab773a9]

          from Function.bindAndInvokeAndServeResponse catching an exception and trying to render it, which seems inappropriate to me: surely the JavaScript caller is not expecting to get a Throwable even if one could somehow be serialized to JSON.

          Jesse Glick added a comment - Got this from pending changes in script-security : failed to serialize net.sf.json.JSONException: java.lang.reflect.InvocationTargetException for /jenkins/$stapler/bound/…/getClasspathRenderInfo given [org.kohsuke.stapler.bind.BoundObjectTable@6ef63dd5, org.kohsuke.stapler.bind.BoundObjectTable$Table@4e78f607, org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval@2ab773a9] from Function.bindAndInvokeAndServeResponse catching an exception and trying to render it, which seems inappropriate to me: surely the JavaScript caller is not expecting to get a Throwable even if one could somehow be serialized to JSON.

          Jesse Glick added a comment -

          Improving that in Stapler 1.229.

          Jesse Glick added a comment - Improving that in Stapler 1.229.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: