net.sf.json.JSONException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Jackson 1.x and Jackson 2.x annotations are in different places inside Java, so this can be either import related (check if you imported the right one) or you might have different versions in your classpath causing conflict.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • 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}
    via by Matt McClean,
  • 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}
    via by Matt McClean,
  • Servlet communicate with Hibernate
    via Stack Overflow by F3RN1
    ,
  • User list for the Hudson continuous build server.
    via by Unknown author,
  • Failed to parse form data. Please report this problem as a bug JSON={"":"<embed height=\"300\" src=\"ws/build/pdepend/overview-pyramid.svg\" type=\"image/svg+xml\" width=\"500\"><\/embed>\n<embed height=\"300\" src=\"ws/build/pdepend/dependencies.svg\" type=\"image/svg+xml\" width=\"500\"><\/embed>","builder":{"antOpts":"","buildFile":"","kind":"hudson.tasks.Ant","properties":"","stapler-class":"hudson.tasks.Ant","targets":""},"core:apply":"","description":"<embed height=\"300\" src=\"ws/build/pdepend/overview-pyramid.svg\" type=\"image/svg+xml\" width=\"500\"><\/embed>\n<embed height=\"300\" src=\"ws/build/pdepend/dependencies.svg\" type=\"image/svg+xml\" width=\"500\"><\/embed>","displayNameOrNull":"","htmlpublisher-HtmlPublisher":{"reportTargets":[{"keepAll":true,"reportDir":"build/api","reportFiles":"index.html","reportName":"API Documentation"},{"keepAll":true,"reportDir":"build/code-browser","reportFiles":"index.html","reportName":"Code Browser"}]},"hudson-plugins-ansicolor-AnsiColorBuildWrapper":{},"hudson-plugins-checkstyle-CheckStylePublisher":{"canComputeNew":{"failedNewAll":"","failedNewHigh":"","failedNewLow":"","failedNewNormal":"","unstableNewAll":"","unstableNewHigh":"","unstableNewLow":"","unstableNewNormal":"","useDeltaValues":false},"canRunOnFailed":true,"defaultEncoding":"","failedTotalAll":"","failedTotalHigh":"","failedTotalLow":"","failedTotalNormal":"","healthy":"","pattern":"build/logs/checkstyle.xml","shouldDetectModules":false,"thresholdLimit":"low","unHealthy":"","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalLow":"","unstableTotalNormal":""},"hudson-plugins-dry-DryPublisher":{"canComputeNew":{"failedNewAll":"","failedNewHigh":"","failedNewLow":"","failedNewNormal":"","unstableNewAll":"","unstableNewHigh":"","unstableNewLow":"","unstableNewNormal":"","useDeltaValues":false},"canRunOnFailed":true,"defaultEncoding":"","failedTotalAll":"","failedTotalHigh":"","failedTotalLow":"","failedTotalNormal":"","healthy":"","highThreshold":"50","normalThreshold":"25","pattern":"build/logs/pmd-cpd.xml","shouldDetectModules":false,"thresholdLimit":"low","unHealthy":"","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalLow":"","unstableTotalNormal":""},"hudson-plugins-jdepend-JDependRecorder":{"configuredJDependFile":"build/logs/jdepend.xml"},"hudson-plugins-plot-PlotPublisher":{"plots":[{"csvFileName":"123.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"A - Lines of code","useDescr":false,"yaxis":"Lines of Code"},{"csvFileName":"1107599928.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"B - Structures","useDescr":false,"yaxis":"Count"},{"csvFileName":"523405415.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"G - Average Length","useDescr":false,"yaxis":"Average Non-Comment Lines of Code"},{"csvFileName":"186376189.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"H - Relative Cyclomatic Complexity","useDescr":false,"yaxis":"Cyclomatic Complexity by Structure"},{"csvFileName":"594356163.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"D - Types of Classes","useDescr":false,"yaxis":"Count"},{"csvFileName":"1019987862.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"E - Types of Methods","useDescr":false,"yaxis":"Count"},{"csvFileName":"217648577.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv"},"style":"line","title":"F - Types of Constants","useDescr":false,"yaxis":"Count"},{"csvFileName":"174807245.csv","group":"phploc","numBuilds":"100","series":{"file":"build/logs/phploc.csv","fileType":{"displayTableFlag":false,"exclusionValues":"Classes,Methods,Functions,Test Clases,Test Methods","inclusionFlag":"INCLUDE_BY_STRING","url":"","value":"csv"}},"style":"line","title":"C - Testing","useDescr":false,"yaxis":"Count"}]},"hudson-plugins-pmd-PmdPublisher":{"canComputeNew":{"failedNewAll":"","failedNewHigh":"","failedNewLow":"","failedNewNormal":"","unstableNewAll":"","unstableNewHigh":"","unstableNewLow":"","unstableNewNormal":"","useDeltaValues":false},"canRunOnFailed":true,"defaultEncoding":"","failedTotalAll":"","failedTotalHigh":"","failedTotalLow":"","failedTotalNormal":"","healthy":"","pattern":"build/logs/pmd.xml","shouldDetectModules":false,"thresholdLimit":"low","unHealthy":"","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalLow":"","unstableTotalNormal":""},"hudson-plugins-violations-ViolationsPublisher":{"encoding":"default","fauxProjectPath":"","limit":"100","max":["999","999","999","999","999","999","999","999","999","999","999","999","999","999","999"],"min":["10","10","10","10","10","10","10","10","10","10","10","10","10","10","10"],"pattern":["build/logs/checkstyle.xml","","build/logs/pmd-cpd.xml","","","","","","","","","build/logs/pmd.xml","","",""],"sourcePathPattern":"","unstable":["999","999","999","999","999","999","999","999","999","999","999","999","999","999","999"]},"hudson-triggers-SCMTrigger":{"scmpoll_spec":"* * * * *"},"name":"bankaccount","org-jenkinsci-plugins-cloverphp-CloverPublisher":{"methodCoverage":["70","",""],"publishHtmlReport":{"disableArchiving":false,"reportDir":"build/coverage"},"statementCoverage":["80","",""],"xmlLocation":"build/logs/clover.xml"},"org-jenkinsci-plugins-xunit-XUnitPublisher":{"thresholdMode":"NUMBER","thresholds":[{"failureNewThreshold":"0","failureThreshold":"0","kind":"org.jenkinsci.plugins.xunit.threshold.FailedThresholdDescriptor","stapler-class":"org.jenkinsci.plugins.xunit.threshold.FailedThreshold","unstableNewThreshold":"0","unstableThreshold":"0"},{"failureNewThreshold":"0","failureThreshold":"0","kind":"org.jenkinsci.plugins.xunit.threshold.SkippedThresholdDescriptor","stapler-class":"org.jenkinsci.plugins.xunit.threshold.SkippedThreshold","unstableNewThreshold":"0","unstableThreshold":"0"}],"tools":{"deleteOutputFiles":true,"faildedIfNotNew":true,"kind":"class com.thalesgroup.dtkit.junit.PHPUnit","pattern":"build/logs/junit.xml","stapler-class":"com.thalesgroup.dtkit.metrics.hudson.model.PHPUnitJunitHudsonTestType","stopProcessingIfError":true}},"properties":{"hudson-model-ParametersDefinitionProperty":{},"stapler-class-bag":"true"},"scm":{"":["hudson.plugins.git.util.DefaultBuildChooser","auto"],"authorOrCommitter":false,"branches":{"name":"master"},"buildChooser":{"stapler-class":"hudson.plugins.git.util.DefaultBuildChooser"},"clean":false,"disableSubmodules":false,"excludedRegions":"","excludedUsers":"","gitConfigEmail":"","gitConfigName":"","gitTool":"Default","ignoreNotifyCommit":false,"includedRegions":"","localBranch":"","pruneBranches":false,"recursiveSubmodules":false,"reference":"","relativeTargetDir":"","remotePoll":false,"scmName":"","skipTag":false,"userRemoteConfigs":{"name":"","refspec":"","url":"git://github.com/thePHPcc/bankaccount.git"},"value":"1","wipeOutWorkspace":false}} net.sf.json.JSONException: null object at net.sf.json.JSONObject.verifyIsNull(JSONObject.java:2428) at net.sf.json.JSONObject.element(JSONObject.java:1486) at net.sf.json.JSONObject.element(JSONObject.java:1469) at net.sf.json.JSONObject.put(JSONObject.java:2065) at hudson.plugins.plot.SeriesFactory.createSeries(SeriesFactory.java:27) at hudson.plugins.plot.SeriesFactory.createSeriesList(SeriesFactory.java:43) at hudson.plugins.plot.PlotPublisher$DescriptorImpl.bindPlot(PlotPublisher.java:231) at hudson.plugins.plot.PlotPublisher$DescriptorImpl.newInstance(PlotPublisher.java:224) at hudson.plugins.plot.PlotPublisher$DescriptorImpl.newInstance(PlotPublisher.java:202) at hudson.util.DescribableList.rebuild(DescribableList.java:154) at hudson.model.Project.submit(Project.java:198) at hudson.model.Job.doConfigSubmit(Job.java:990) at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:665) 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:616) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:288) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:151) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:90) 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:574) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:241) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:574) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:659) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:488) at org.kohsuke.stapler.Stapler.service(Stapler.java:162) 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:95) at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:74) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:87) at winstone.FilterConfiguration.execute(FilterConfiguration.java:194) at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:366) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47) 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 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:215) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:679)
    via by sebastian_bergmann,
    • 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.workflow.RegistryEndpointStep$Execution.newKeyMaterialFactory(RegistryEndpointStep.java:61) at org.jenkinsci.plugins.docker.workflow.AbstractEndpointStepExecution.start(AbstractEndpointStepExecution.java:44) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:136) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:98) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) at com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,