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

Saving job config with managed script builder causes json error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • Jenkins 1.456
      Managed Scripts plugin

      Saving a job configuration to add new managed script
      1. Define script arguments is unchecked but the arguments text box is still shown
      2. When saving with empty argument or setting a dummy value the following error is seen:

      Failed to parse form data. Please report this problem as a bug
      JSON={"":"<b>Workflow -<\/b>\n<br />","builder":[{"buildStepArgs":[

      {"arg":""}

      ,

      {"arg":"foo"}

      ],"buildStepId":"ScriptBuildStepConfigProvider.1330354154388","defineArgs":true,"kind":"org.jenkinsci.plugins.managedscripts.ScriptBuildStep","stapler-class":"org.jenkinsci.plugins.managedscripts.ScriptBuildStep"},

      {"command":"source stage-env.sh\nmake all check","kind":"hudson.tasks.Shell","stapler-class":"hudson.tasks.Shell"}

      ],"core:apply":"","description":"<b>Workflow <\/b>\n<br />\n developers pushes a commit to gerrit<br />\n- a build is triggered on Jenkins<br />\n- if the build is successful, then the gerrit user configured in Jenkins marks the commit as verified<br />\n- code reviewer reviews the change list<br />\n- if code reviewer provides +2 for the review and Jenkins provides +1 for verify, commit is merged with the branch<br />\n<br />","displayNameOrNull":"","hasSlaveAffinity":

      {"assignedLabelString":"ubuntu"}

      ,"hudson-plugins-timestamper-TimestamperBuildWrapper":{},"hudson-triggers-SCMTrigger":

      {"scmpoll_spec":"*/10 * * * *"}

      ,"logrotate":

      {"logrotate_artifact_days":"","logrotate_artifact_nums":"","logrotate_days":"","logrotate_nums":""}

      ,"name":"libbbSensors_Main_linux","org-jenkinsci-plugins-configfiles-buildwrapper-ConfigFileBuildWrapper":{"managedFiles":{"fileId":"DefaultGlobalMavenSettingsProvider.1323370547609","targetLocation":"package/dev-settings.xml","variable":""}},"properties":{"com-coravy-hudson-plugins-github-GithubProjectProperty":

      {"projectUrl":""}

      ,"hudson-model-ParametersDefinitionProperty":{},"hudson-plugins-heavy_job-HeavyJobProperty":

      {"weight":"1"}

      ,"hudson-plugins-promoted_builds-JobPropertyImpl":{},"hudson-plugins-sidebar_link-ProjectLinks":{},"hudson-plugins-throttleconcurrents-ThrottleJobProperty":

      {"categories":false,"maxConcurrentPerNode":"0","maxConcurrentTotal":"0","throttleEnabled":false,"throttleOption":"category"}

      ,"hudson-queueSorter-PrioritySorterJobProperty":

      {"priority":"100"}

      ,"stapler-class-bag":"true"},"scm":{"":["hudson.plugins.git.util.DefaultBuildChooser","6"],"authorOrCommitter":false,"branches":[

      {"name":"origin/master"}

      ,

      {"name":"origin/develop"}

      ],"browser":

      {"stapler-class":"hudson.plugins.git.browser.GitWeb","url":"http://gerrit.rim.net/gitweb?p=bb/libs/libbbSensors.git"}

      ,"buildChooser":

      {"stapler-class":"hudson.plugins.git.util.DefaultBuildChooser"}

      ,"clean":true,"disableSubmodules":false,"excludedRegions":"","excludedUsers":"","gitConfigEmail":"BBSIBuilds@rim.com","gitConfigName":"bbsibuilds","gitTool":"Default","includedRegions":"","localBranch":"","pruneBranches":false,"recursiveSubmodules":false,"reference":"","relativeTargetDir":"","remotePoll":false,"scmName":"","skipTag":true,"userRemoteConfigs":

      {"name":"","refspec":"+refs/heads/master:refs/remotes/origin/master","url":"http://git.rim.net/bb/libs/libbbSensors.git"}

      ,"value":"1","wipeOutWorkspace":true}}

      net.sf.json.JSONException: JSONObject["defineArgs"] is not a JSONObject.
      at net.sf.json.JSONObject.getJSONObject(JSONObject.java:1759)
      at org.jenkinsci.plugins.managedscripts.ScriptBuildStep$DescriptorImpl.newInstance(ScriptBuildStep.java:300)
      at org.jenkinsci.plugins.managedscripts.ScriptBuildStep$DescriptorImpl.newInstance(ScriptBuildStep.java:185)
      at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:909)
      at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:896)
      at hudson.util.DescribableList.rebuildHetero(DescribableList.java:184)
      at hudson.model.Project.submit(Project.java:197)
      at hudson.model.Job.doConfigSubmit(Job.java:989)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:659)
      at sun.reflect.GeneratedMethodAccessor1896.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      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:563)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
      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:563)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:648)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      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 net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:185)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:159)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:86)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:74)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:98)
      at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:66)
      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.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:61)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      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:245)
      at winstone.RequestHandlerThread.run(RequestHandlerThread.java:148)
      at java.lang.Thread.run(Thread.java:662)

            domi Dominik Bartholdi
            marcrobinson Marc Robinson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: