net.sf.json.JSONException: JSONArray[0] is not a JSONObject.

Jenkins JIRA | Maxfield Stewart | 8 months ago
  1. 0

    Get the following error no matter how I configured creds (no creds with job token, username with token, or using a username/password creds file). ERROR: Build step failed with exception net.sf.json.JSONException: JSONArray[0] is not a JSONObject. at net.sf.json.JSONArray.getJSONObject(JSONArray.java:1977) at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:563) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Trigger a remote parameterized job' marked build as failure It seems Jenkins no longer returning properly formed JSON when jobs are triggered. There's nothing in the jenkins.log on the machine receiving the request to trigger a build but the build does in fact get triggered and start. The issue is on the sending side. This stack trace causes the build to fail and breaks builds, otherwise it would be easy to ignore. I confirmed that I can remote trigger jobs by hand hitting the URL in the various forms but also confirmed there's no response back whatsoever other than a response "201" (created). There's no body or other payload in the response. I should note this failure started upon upgrading to 1.653 from 1.618 (it was previously working just fine on the same version of the plugin). I've confirmed this problem exists on a fresh install as well.

    Jenkins JIRA | 8 months ago | Maxfield Stewart
    net.sf.json.JSONException: JSONArray[0] is not a JSONObject.
  2. 0

    Get the following error no matter how I configured creds (no creds with job token, username with token, or using a username/password creds file). ERROR: Build step failed with exception net.sf.json.JSONException: JSONArray[0] is not a JSONObject. at net.sf.json.JSONArray.getJSONObject(JSONArray.java:1977) at org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:563) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782) at hudson.model.Build$BuildExecution.build(Build.java:205) at hudson.model.Build$BuildExecution.doRun(Build.java:162) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1738) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) Build step 'Trigger a remote parameterized job' marked build as failure It seems Jenkins no longer returning properly formed JSON when jobs are triggered. There's nothing in the jenkins.log on the machine receiving the request to trigger a build but the build does in fact get triggered and start. The issue is on the sending side. This stack trace causes the build to fail and breaks builds, otherwise it would be easy to ignore. I confirmed that I can remote trigger jobs by hand hitting the URL in the various forms but also confirmed there's no response back whatsoever other than a response "201" (created). There's no body or other payload in the response. I should note this failure started upon upgrading to 1.653 from 1.618 (it was previously working just fine on the same version of the plugin). I've confirmed this problem exists on a fresh install as well.

    Jenkins JIRA | 8 months ago | Maxfield Stewart
    net.sf.json.JSONException: JSONArray[0] is not a JSONObject.
  3. 0

    Jenkins Parameterized Remote Trigger Plugin error"JSONArray[0] is not a JSONObject."

    Stack Overflow | 9 months ago | FindABug
    net.sf.json.JSONException: JSONArray[0] is not a JSONObject.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [parameterized-remote-trigger-plugin] (JENKINS-33679) Jenkins 1.653 breaks Parameterized-Remote-Trigger-Plugin

    Google Groups | 8 months ago | mstewart@riotgames.com (JIRA)
    net.sf.json.JSONException: JSONArray<span class="error">[0]</span> is not a JSONObject.
  6. 0

    {code}SEVERE: Error while serving http://localhost:8080/descriptor/hudson.model.DownloadService/byId/hudson.tasks.Maven.MavenInstaller/postBack java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:297) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:160) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:95) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:111) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:239) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799) at org.kohsuke.stapler.MetaClass$12.dispatch(MetaClass.java:381) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:799) at org.kohsuke.stapler.MetaClass$4.doDispatch(MetaClass.java:201) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:685) 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) at javax.servlet.http.HttpServlet.service(HttpServlet.java:45) at winstone.ServletConfiguration.execute(ServletConfiguration.java:248) at winstone.RequestDispatcher.forward(RequestDispatcher.java:333) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:376) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at winstone.RequestDispatcher.forward(RequestDispatcher.java:331) at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:227) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: net.sf.json.JSONException: JSONObject["certificates"] is not a JSONArray. at net.sf.json.JSONObject.getJSONArray(JSONObject.java:1986) at jenkins.util.JSONSignatureValidator.verifySignature(JSONSignatureValidator.java:60) at hudson.model.DownloadService$Downloadable.doPostBack(DownloadService.java:259) ... 55 more{code}

    Jenkins JIRA | 3 years ago | jieryn
    java.lang.reflect.InvocationTargetException

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. net.sf.json.JSONException

      JSONArray[0] is not a JSONObject.

      at net.sf.json.JSONArray.getJSONObject()
    2. json-lib
      JSONArray.getJSONObject
      1. net.sf.json.JSONArray.getJSONObject(JSONArray.java:1977)
      1 frame
    3. org.jenkinsci.plugins
      RemoteBuildConfiguration.perform
      1. org.jenkinsci.plugins.ParameterizedRemoteTrigger.RemoteBuildConfiguration.perform(RemoteBuildConfiguration.java:563)
      1 frame
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      3. hudson.model.Build$BuildExecution.build(Build.java:205)
      4. hudson.model.Build$BuildExecution.doRun(Build.java:162)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
      6. hudson.model.Run.execute(Run.java:1738)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:410)
      9 frames