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

job-dsl-plugin fails to work on Jenkins ver. 1.557

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Plugin install + restarted -> no issues.
      Following the tutorial : https://github.com/jenkinsci/job-dsl-plugin/wiki/Tutorial---Using-the-Jenkins-Job-DSL

      After coying the DSL exmaple Script block, and pressing save. I get the following error msg :

      Stack trace
      
      javax.servlet.ServletException: java.lang.RuntimeException: Failed to instantiate class javaposse.jobdsl.plugin.ExecuteDslScripts from {"scriptLocation":"true","scriptText":"job('DSL-Tutorial-1-Test') {\n    scm {\n        git('git://github.com/jgritman/aws-sdk-test.git')\n    }\n    triggers {\n        scm('*/15 * * * *')\n    }\n    steps {\n        maven('-e clean test')\n    }\n}","targets":"","ignoreExisting":false,"removedJobAction":"","removedViewAction":"","lookupStrategy":"JENKINS_ROOT","additionalClasspath":"","stapler-class<span class="code-quote">":"javaposse.jobdsl.plugin.ExecuteDslScripts","kind":"javaposse.jobdsl.plugin.ExecuteDslScripts"}
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:778)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	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:728)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	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:728)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	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:728)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:225)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	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 jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      	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:174)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      	at jenkins.security.ApiTokenFilter.doFilter(ApiTokenFilter.java:74)
      	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:67)
      	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 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
      	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
      	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
      	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: java.lang.RuntimeException: Failed to instantiate class javaposse.jobdsl.plugin.ExecuteDslScripts from {"scriptLocation":"true","scriptText":"job('DSL-Tutorial-1-Test') {\n    scm {\n        git('git://github.com/jgritman/aws-sdk-test.git')\n    }\n    triggers {\n        scm('*/15 * * * *')\n    }\n    steps {\n        maven('-e clean test')\n    }\n}","targets":"","ignoreExisting":false,"removedJobAction":"","removedViewAction":"","lookupStrategy":"JENKINS_ROOT","additionalClasspath":"","stapler-class<span class="code-quote">":"javaposse.jobdsl.plugin.ExecuteDslScripts","kind":"javaposse.jobdsl.plugin.ExecuteDslScripts"}
      	at hudson.model.Descriptor.newInstance(Descriptor.java:576)
      	at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:914)
      	at hudson.model.Descriptor.newInstancesFromHeteroList(Descriptor.java:899)
      	at hudson.util.DescribableList.rebuildHetero(DescribableList.java:203)
      	at hudson.model.Project.submit(Project.java:207)
      	at hudson.model.Job.doConfigSubmit(Job.java:1152)
      	at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:774)
      	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:298)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
      	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:728)
      	... 72 more
      Caused by: java.lang.IllegalArgumentException: Failed to instantiate class javaposse.jobdsl.plugin.ExecuteDslScripts from {"scriptLocation":"true","scriptText":"job('DSL-Tutorial-1-Test') {\n    scm {\n        git('git://github.com/jgritman/aws-sdk-test.git')\n    }\n    triggers {\n        scm('*/15 * * * *')\n    }\n    steps {\n        maven('-e clean test')\n    }\n}","targets":"","ignoreExisting":false,"removedJobAction":"","removedViewAction":"","lookupStrategy":"JENKINS_ROOT","additionalClasspath":"","stapler-class<span class="code-quote">":"javaposse.jobdsl.plugin.ExecuteDslScripts","kind":"javaposse.jobdsl.plugin.ExecuteDslScripts"}
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:589)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:396)
      	at hudson.model.Descriptor.newInstance(Descriptor.java:567)
      	... 88 more
      Caused by: java.lang.IllegalArgumentException: Failed to convert the scriptLocation parameter of the constructor public javaposse.jobdsl.plugin.ExecuteDslScripts(javaposse.jobdsl.plugin.ExecuteDslScripts$ScriptLocation,boolean,javaposse.jobdsl.plugin.RemovedJobAction,javaposse.jobdsl.plugin.RemovedViewAction,javaposse.jobdsl.plugin.LookupStrategy,java.lang.String)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:686)
      	at org.kohsuke.stapler.RequestImpl.access$100(RequestImpl.java:81)
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:587)
      	... 91 more
      Caused by: java.lang.IllegalArgumentException: Unable to convert to class javaposse.jobdsl.plugin.ExecuteDslScripts$ScriptLocation
      	at org.kohsuke.stapler.RequestImpl$TypePair.convertJSON(RequestImpl.java:644)
      	at org.kohsuke.stapler.RequestImpl.bindJSON(RequestImpl.java:400)
      	at org.kohsuke.stapler.RequestImpl.instantiate(RequestImpl.java:684)
      	... 93 more

        Attachments

          Activity

          Hide
          daspilker Daniel Spilker added a comment -

          This is a bug in Jenkins core, at least in versions 1.557, 1.558 and 1.559. I tested 1.560 and the 1.554.2 LTS release and both do not show the bug.

          I opened a pull request to increase the minimum supported Jenkins core version to the 1.565 LTS release line. See https://github.com/jenkinsci/job-dsl-plugin/pull/471.

          If you are using older releases, it's recommended to use the LTS releases. See https://wiki.jenkins-ci.org/display/JENKINS/LTS+Release+Line. You could upgrade or downgrade to the nearest LTS release, e.g. 1.554.3 or 1.565.3. The Job DSL plugin will work in both.

          Show
          daspilker Daniel Spilker added a comment - This is a bug in Jenkins core, at least in versions 1.557, 1.558 and 1.559. I tested 1.560 and the 1.554.2 LTS release and both do not show the bug. I opened a pull request to increase the minimum supported Jenkins core version to the 1.565 LTS release line. See https://github.com/jenkinsci/job-dsl-plugin/pull/471 . If you are using older releases, it's recommended to use the LTS releases. See https://wiki.jenkins-ci.org/display/JENKINS/LTS+Release+Line . You could upgrade or downgrade to the nearest LTS release, e.g. 1.554.3 or 1.565.3. The Job DSL plugin will work in both.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Daniel Spilker
          Path:
          Vagrantfile
          docs/Home.md
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/MockJobManagement.groovy
          job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/triggers/TriggerContext.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/CoreVersionASTTransformationSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy
          job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/triggers/TriggerContextSpec.groovy
          job-dsl-plugin/build.gradle
          http://jenkins-ci.org/commit/job-dsl-plugin/08a42d269b62cde2a88229d7e3a249aa064ab520
          Log:
          Merge pull request #471 from CoreMedia/JENKINS-28167

          JENKINS-28167 updated minimum Jenkins core version to 1.565

          Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/5db908747fe3...08a42d269b62

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Spilker Path: Vagrantfile docs/Home.md job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/MockJobManagement.groovy job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/triggers/TriggerContext.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/CoreVersionASTTransformationSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/publisher/PublisherContextSpec.groovy job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/triggers/TriggerContextSpec.groovy job-dsl-plugin/build.gradle http://jenkins-ci.org/commit/job-dsl-plugin/08a42d269b62cde2a88229d7e3a249aa064ab520 Log: Merge pull request #471 from CoreMedia/ JENKINS-28167 JENKINS-28167 updated minimum Jenkins core version to 1.565 Compare: https://github.com/jenkinsci/job-dsl-plugin/compare/5db908747fe3...08a42d269b62

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              karelstriegel Karel Striegel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: