net.sf.json.JSONException: null object

jenkins-ci.org | 3 months ago
  1. 0

    I am trying to build and publish a Docker image using the "docker-build-publish-plugin" module and getting the stack trace error below. I am using the Jenkins credential module to store the Docker Hub credentials. I am have configured the Docker build step with the default setting of the Docker Hub registry: https://index.docker.io/v1/ {noformat} Started by an SCM change Building in workspace /var/jenkins_home/workspace/WeatherMicroservice [AWS CodePipeline Plugin] Job '91a8fc23-8ee8-4e60-80a3-fa5a68782820' received [AWS CodePipeline Plugin] Clearing Workspace '/var/jenkins_home/workspace/WeatherMicroservice' before download [AWS CodePipeline Plugin] Detected compression type: Zip [AWS CodePipeline Plugin] Successfully downloaded the artifacts from CodePipelines [AWS CodePipeline Plugin] File downloaded successfully [AWS CodePipeline Plugin] Extracting '/var/jenkins_home/workspace/WeatherMicroservice/dCSbFDZ.zip' to '/var/jenkins_home/workspace/WeatherMicroservice' [AWS CodePipeline Plugin] File uncompressed successfully ERROR: Build step failed with exception net.sf.json.JSONException: null object at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2688) at net.sf.json.JSONObject.element(JSONObject.java:1733) at net.sf.json.JSONObject.element(JSONObject.java:1716) at net.sf.json.JSONObject.put(JSONObject.java:2328) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:100) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:71) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken.newKeyMaterialFactory(DockerRegistryToken.java:71) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:204) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:193) at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:381) at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:359) at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:305) at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:252) at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:233) at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:208) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.Build$BuildExecution.build(Build.java:203) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Build step 'Docker Build and Publish' marked build as failure [AWS CodePipeline Plugin] Publishing artifacts [AWS CodePipeline Plugin] Build Failed. PutJobFailureResult Build step 'AWS CodePipeline Publisher' marked build as failure Finished: FAILURE {noformat}

    Jenkins JIRA | 1 year ago | Matt McClean
    net.sf.json.JSONException: null object
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    I am trying to build and publish a Docker image using the "docker-build-publish-plugin" module and getting the stack trace error below. I am using the Jenkins credential module to store the Docker Hub credentials. I am have configured the Docker build step with the default setting of the Docker Hub registry: https://index.docker.io/v1/ {noformat} Started by an SCM change Building in workspace /var/jenkins_home/workspace/WeatherMicroservice [AWS CodePipeline Plugin] Job '91a8fc23-8ee8-4e60-80a3-fa5a68782820' received [AWS CodePipeline Plugin] Clearing Workspace '/var/jenkins_home/workspace/WeatherMicroservice' before download [AWS CodePipeline Plugin] Detected compression type: Zip [AWS CodePipeline Plugin] Successfully downloaded the artifacts from CodePipelines [AWS CodePipeline Plugin] File downloaded successfully [AWS CodePipeline Plugin] Extracting '/var/jenkins_home/workspace/WeatherMicroservice/dCSbFDZ.zip' to '/var/jenkins_home/workspace/WeatherMicroservice' [AWS CodePipeline Plugin] File uncompressed successfully ERROR: Build step failed with exception net.sf.json.JSONException: null object at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2688) at net.sf.json.JSONObject.element(JSONObject.java:1733) at net.sf.json.JSONObject.element(JSONObject.java:1716) at net.sf.json.JSONObject.put(JSONObject.java:2328) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:100) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:71) at hudson.remoting.LocalChannel.call(LocalChannel.java:45) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken.newKeyMaterialFactory(DockerRegistryToken.java:71) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:204) at org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:193) at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:381) at com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:359) at com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:305) at com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:252) at com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:233) at com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:208) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761) at hudson.model.Build$BuildExecution.build(Build.java:203) at hudson.model.Build$BuildExecution.doRun(Build.java:160) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536) at hudson.model.Run.execute(Run.java:1741) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Build step 'Docker Build and Publish' marked build as failure [AWS CodePipeline Plugin] Publishing artifacts [AWS CodePipeline Plugin] Build Failed. PutJobFailureResult Build step 'AWS CodePipeline Publisher' marked build as failure Finished: FAILURE {noformat}

    Jenkins JIRA | 1 year ago | Matt McClean
    net.sf.json.JSONException: null object

    3 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

      null object

      at net.sf.json.JSONObject.verifyIsNull()
    2. json-lib
      JSONObject.put
      1. net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2688)
      2. net.sf.json.JSONObject.element(JSONObject.java:1733)
      3. net.sf.json.JSONObject.element(JSONObject.java:1716)
      4. net.sf.json.JSONObject.put(JSONObject.java:2328)
      4 frames
    3. org.jenkinsci.plugins
      DockerRegistryToken$1.call
      1. org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:100)
      2. org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken$1.call(DockerRegistryToken.java:71)
      2 frames
    4. Hudson :: Remoting Layer
      LocalChannel.call
      1. hudson.remoting.LocalChannel.call(LocalChannel.java:45)
      1 frame
    5. org.jenkinsci.plugins
      DockerRegistryEndpoint.newKeyMaterialFactory
      1. org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryToken.newKeyMaterialFactory(DockerRegistryToken.java:71)
      2. org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:204)
      3. org.jenkinsci.plugins.docker.commons.credentials.DockerRegistryEndpoint.newKeyMaterialFactory(DockerRegistryEndpoint.java:193)
      3 frames
    6. com.cloudbees.dockerpublish
      DockerBuilder.perform
      1. com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:381)
      2. com.cloudbees.dockerpublish.DockerBuilder$Perform.executeCmd(DockerBuilder.java:359)
      3. com.cloudbees.dockerpublish.DockerBuilder$Perform.buildAndTag(DockerBuilder.java:305)
      4. com.cloudbees.dockerpublish.DockerBuilder$Perform.exec(DockerBuilder.java:252)
      5. com.cloudbees.dockerpublish.DockerBuilder$Perform.access$100(DockerBuilder.java:233)
      6. com.cloudbees.dockerpublish.DockerBuilder.perform(DockerBuilder.java:208)
      6 frames
    7. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      3. hudson.model.Build$BuildExecution.build(Build.java:203)
      4. hudson.model.Build$BuildExecution.doRun(Build.java:160)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:536)
      6. hudson.model.Run.execute(Run.java:1741)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:374)
      9 frames