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

Jenkins fails to save configuration if invoking gradle file with: net.sf.json.JSONException: JSONObject["useWrapper"] is not a JSONObject

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • gradle-plugin
    • None
    • OSX 10.8.5 Jenkins 1.536 Jenkins gradle plugin org.jenkins-ci.plugins:gradle:1.23

    Description

      If I add invoke Gradle to my configuration I get the following Error if I try to save the configuration:

      Failed to parse form data. Please report this problem as a bug
      JSON={"name":"project_name-android","description":"","":["","0"],"logrotate":true,"buildDiscarder":

      {"stapler-class":"hudson.tasks.LogRotator","daysToKeepStr":"20","numToKeepStr":"20","artifactDaysToKeepStr":"","artifactNumToKeepStr":""}

      ,"properties":{"stapler-class-bag":"true","hudson-model-ParametersDefinitionProperty":{"parameterized":{"parameter":[

      {"name":"GIT_REV","defaultValue":"origin/development","description":"","stapler-class":"hudson.model.StringParameterDefinition","kind":"hudson.model.StringParameterDefinition"}

      ,

      {"name":"BUILD_DESCRIPTION","defaultValue":"This is a jenkins autobuild!","description":"","stapler-class":"hudson.model.StringParameterDefinition","kind":"hudson.model.StringParameterDefinition"}

      ,

      {"name":"BUILD_TAGS","defaultValue":"internal","description":"","stapler-class":"hudson.model.StringParameterDefinition","kind":"hudson.model.StringParameterDefinition"}

      ]}},"hudson-plugins-throttleconcurrents-ThrottleJobProperty":{"throttleEnabled":false,"throttleOption":"project","maxConcurrentTotal":"1","maxConcurrentPerNode":"1","categories":"Android-Emulator"}},"displayNameOrNull":"","scm":{"value":"2","userRemoteConfigs":

      {"url":"git@projects.git_server.net:project_name-android.git","name":"","refspec":""}

      ,"branches":{"name":"${GIT_REV}"},"includedRegions":"","excludedRegions":"","excludedUsers":"","localBranch":"","relativeTargetDir":"","reference":"","scmName":"","gitConfigName":"","gitConfigEmail":"","pruneBranches":false,"skipTag":false,"clean":false,"remotePoll":false,"disableSubmodules":false,"recursiveSubmodules":false,"authorOrCommitter":false,"wipeOutWorkspace":false,"ignoreNotifyCommit":false,"useShallowClone":false,"":["hudson.plugins.git.util.DefaultBuildChooser","auto"],"buildChooser":

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

      ,"gitTool":"Default"},"builder":[{"useWrapper":

      {"value":"false","gradleName":"Gradle 1.8"}

      ,"description":"","switches":"","tasks":"assemble","rootBuildScriptDir":"","buildFile":"","useWorkspaceAsHome":false,"stapler-class":"hudson.plugins.gradle.Gradle","kind":"hudson.plugins.gradle.Gradle"},

      {"targets":"","buildFile":"checkstyle-ant.xml","properties":"","antOpts":"","stapler-class":"hudson.tasks.Ant","kind":"hudson.tasks.Ant"}

      ,

      {"command":"os_opts=\"-Djava.awt.headless=true\" lint --xml lint-results.xml .","stapler-class":"hudson.tasks.Shell","kind":"hudson.tasks.Shell"}

      ],"publisher":[

      {"pattern":"","canRunOnFailed":false,"shouldDetectModules":false,"healthy":"","unHealthy":"","thresholdLimit":"low","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalNormal":"","unstableTotalLow":"","failedTotalAll":"","failedTotalHigh":"","failedTotalNormal":"","failedTotalLow":"","defaultEncoding":"","stapler-class":"org.jenkinsci.plugins.android_lint.LintPublisher","kind":"org.jenkinsci.plugins.android_lint.LintPublisher"}

      ,

      {"pattern":"","canRunOnFailed":false,"shouldDetectModules":false,"healthy":"","unHealthy":"","thresholdLimit":"low","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalNormal":"","unstableTotalLow":"","failedTotalAll":"","failedTotalHigh":"","failedTotalNormal":"","failedTotalLow":"","defaultEncoding":"","stapler-class":"hudson.plugins.checkstyle.CheckStylePublisher","kind":"hudson.plugins.checkstyle.CheckStylePublisher"}

      ,

      {"isCheckStyleActivated":true,"isDryActivated":false,"isWarningsActivated":true,"canRunOnFailed":false,"healthy":"","unHealthy":"","thresholdLimit":"low","unstableTotalAll":"","unstableTotalHigh":"","unstableTotalNormal":"","unstableTotalLow":"","failedTotalAll":"","failedTotalHigh":"","failedTotalNormal":"","failedTotalLow":"","defaultEncoding":"","stapler-class":"hudson.plugins.analysis.collector.AnalysisPublisher","kind":"hudson.plugins.analysis.collector.AnalysisPublisher"}

      ],"core:apply":""}

      net.sf.json.JSONException: JSONObject["useWrapper"] is not a JSONObject.
      at net.sf.json.JSONObject.getJSONObject(JSONObject.java:2006)
      at hudson.plugins.gradle.Gradle$DescriptorImpl.newInstance(Gradle.java:339)
      at hudson.plugins.gradle.Gradle$DescriptorImpl.newInstance(Gradle.java:284)
      at hudson.model.Descriptor$1.instantiate(Descriptor.java:1046)
      at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:665)
      at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
      at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
      at hudson.plugins.gradle.Gradle$DescriptorImpl.newInstance(Gradle.java:347)
      at hudson.plugins.gradle.Gradle$DescriptorImpl.newInstance(Gradle.java:284)
      at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:916)
      at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:901)
      at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
      at hudson.model.Project.submit(Project.java:207)
      at hudson.model.Job.doConfigSubmit(Job.java:1136)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:787)
      at sun.reflect.GeneratedMethodAccessor513.invoke(Unknown Source)
      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:120)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:727)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:841)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:630)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:224)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)
      at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:58)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:99)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      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 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
      at org.eclipse.jetty.server.Server.handle(Server.java:370)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)
      at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
      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:724)

      Attachments

        Issue Links

          Activity

            jleidgens Janusz Leidgens created issue -
            jacobdotcosta Antonio Costa added a comment -

            Also occurs on Ubuntu 12.04.1 LTS, same Jenkins and org.jenkins-ci.plugins:gradle version.

            jacobdotcosta Antonio Costa added a comment - Also occurs on Ubuntu 12.04.1 LTS, same Jenkins and org.jenkins-ci.plugins:gradle version.

            same problem on centos with same jenkins version and gradle version.

            run fine if we downgrade to jenkins 1.523 (our previous jenkins version)

            nicolasgeraud Nicolas Geraud added a comment - same problem on centos with same jenkins version and gradle version. run fine if we downgrade to jenkins 1.523 (our previous jenkins version)
            andrew_garner Andrew Garner added a comment -

            Same error running on Windows Server 2008 R2, with the same Jenkins and gradle plugin versions.

            andrew_garner Andrew Garner added a comment - Same error running on Windows Server 2008 R2, with the same Jenkins and gradle plugin versions.

            Same problem on Ubuntu Server 13.04 with Jenkins 1.536 and Jenkins Gradle plugin 1.23.

            dergreeny Christian Becker added a comment - Same problem on Ubuntu Server 13.04 with Jenkins 1.536 and Jenkins Gradle plugin 1.23.
            scrain Shawn Crain added a comment -

            Same issue encountered on Windows 2008r2, Jenkins 1.536 & Gradle Plugin 1.23.
            Works after downgrading Jenkins to 1.535.

            scrain Shawn Crain added a comment - Same issue encountered on Windows 2008r2, Jenkins 1.536 & Gradle Plugin 1.23. Works after downgrading Jenkins to 1.535.
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Link This issue duplicates JENKINS-20199 [ JENKINS-20199 ]

            Same issue on Ubuntu 13.04, Jenkins 1.536, Jenkins Gradle Plugin 1.23.

            rabbit827 Dushyanth Maguluru added a comment - Same issue on Ubuntu 13.04, Jenkins 1.536, Jenkins Gradle Plugin 1.23.
            wbauer wbauer added a comment -

            Same issue on RHEL 6.3, JEnkins 1.536, Jenkins Gradle Plugin 1.23

            wbauer wbauer added a comment - Same issue on RHEL 6.3, JEnkins 1.536, Jenkins Gradle Plugin 1.23
            skabber Jay Graves added a comment -

            Same here OS X

            skabber Jay Graves added a comment - Same here OS X

            Same problem on Debian 7.1 (wheezy) with Jenkins 1.536 and Jenkins Gradle plugin 1.23.

            henkir Henrik Holmberg added a comment - Same problem on Debian 7.1 (wheezy) with Jenkins 1.536 and Jenkins Gradle plugin 1.23.

            could be related to: #JENKINS-20262. Update to 1.537 (Ubuntu 12.04) solved this issue for me.

            maciej_sawicki Maciej Sawicki added a comment - could be related to: # JENKINS-20262 . Update to 1.537 (Ubuntu 12.04) solved this issue for me.

            This seems indeed to have been fixed in 1.537 (Windows Server 2008 R2).

            mlindgre Mikael Lindgren added a comment - This seems indeed to have been fixed in 1.537 (Windows Server 2008 R2).

            Upgrading to 1.537 fixed the issue for me as well.

            henkir Henrik Holmberg added a comment - Upgrading to 1.537 fixed the issue for me as well.
            eyeamvic Victor Baca made changes -
            Link This issue is related to JENKINS-20262 [ JENKINS-20262 ]
            eyeamvic Victor Baca made changes -
            Link This issue depends on JENKINS-20262 [ JENKINS-20262 ]
            eyeamvic Victor Baca made changes -
            Link This issue is related to JENKINS-20262 [ JENKINS-20262 ]
            eyeamvic Victor Baca added a comment -

            Resolved by JENKINS-20262 when reverting JENKINS-18629.

            eyeamvic Victor Baca added a comment - Resolved by JENKINS-20262 when reverting JENKINS-18629 .
            eyeamvic Victor Baca made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            This has not been an issue of the gradle-jpi-plugin (the Gradle plugin to build Jenkins plugins).

            daspilker Daniel Spilker added a comment - This has not been an issue of the gradle-jpi-plugin (the Gradle plugin to build Jenkins plugins).
            daspilker Daniel Spilker made changes -
            Component/s gradle-jpi-plugin [ 16321 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 151702 ] JNJira + In-Review [ 194055 ]
            wolfs Stefan Wolf made changes -
            Status Resolved [ 5 ] Closed [ 6 ]

            People

              Unassigned Unassigned
              jleidgens Janusz Leidgens
              Votes:
              12 Vote for this issue
              Watchers:
              21 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: