Any workflow script doesn't work. Even this:

      node {
      }
      

      All variants provides this stacktrace in build log:

      Started by user Kanstantsin Shautsou
      java.lang.ExceptionInInitializerError
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      	at java.lang.Class.newInstance(Class.java:442)
      	at org.codehaus.groovy.runtime.InvokerHelper.createScript(InvokerHelper.java:408)
      	at groovy.lang.GroovyShell.parse(GroovyShell.java:743)
      	at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:106)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:361)
      	at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:328)
      	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:189)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:381)
      Caused by: groovy.lang.MissingMethodException: No signature of method: com.cloudbees.groovy.cps.Builder.withClosureType() is applicable for argument types: (java.lang.Class) values: [class org.jenkinsci.plugins.workflow.cps.CpsClosure2]
      	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
      	at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      	at WorkflowScript.___cps___0(WorkflowScript)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
      	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite$StaticMetaMethodSiteNoUnwrapNoCoerce.invoke(StaticMetaMethodSite.java:148)
      	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.callStatic(StaticMetaMethodSite.java:99)
      	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:50)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:161)
      	at WorkflowScript.<clinit>(WorkflowScript)
      	... 13 more
      Finished: FAILURE
      

      How this supposed to be debugged by user?

          [JENKINS-30390] workflow ExceptionInInitializerError

          Jesse Glick added a comment -

          That seems to have done the trick, at least insofar as the artifact now has sane-looking contents.

          amuniz said he would try to write an acceptance test at some point.

          Jesse Glick added a comment - That seems to have done the trick, at least insofar as the artifact now has sane-looking contents. amuniz said he would try to write an acceptance test at some point.

          ATH is not required, it's enough to simply run JenkinsRule and verify build log/status

          Kanstantsin Shautsou added a comment - ATH is not required, it's enough to simply run JenkinsRule and verify build log/status

          drulli sorry, i have no time and busy with plugins that i maintain . It was the second time when i tried workflow hello world and it failed. IMHO better keep it for CB.

          Kanstantsin Shautsou added a comment - drulli sorry, i have no time and busy with plugins that i maintain . It was the second time when i tried workflow hello world and it failed. IMHO better keep it for CB.

          Verified, 1.45 fixed issue.

          Kanstantsin Shautsou added a comment - Verified, 1.45 fixed issue.

          Ulli Hafner added a comment -

          ATH is required, since the JenkinsRule tests actually did not find this bug!

          Ulli Hafner added a comment - ATH is required, since the JenkinsRule tests actually did not find this bug!

          Jesse Glick added a comment -

          Right, JenkinsRule loads plugin code from the test classpath when possible, so it cannot accurately reproduce problems related to class loading.

          Jesse Glick added a comment - Right, JenkinsRule loads plugin code from the test classpath when possible, so it cannot accurately reproduce problems related to class loading.

          Antonio Muñiz added a comment - Acceptance test added: https://github.com/jenkinsci/acceptance-test-harness/pull/40

          Code changed in jenkins
          User: Antonio Muñiz
          Path:
          src/test/java/plugins/AnalysisCollectorPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/f206413ed69a72d6e207d2be19ea6af41d52b5f7
          Log:
          JENKINS-30390 New test: Workflow job using Analysis Collector (with findbugs and checkstyle)

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Muñiz Path: src/test/java/plugins/AnalysisCollectorPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/f206413ed69a72d6e207d2be19ea6af41d52b5f7 Log: JENKINS-30390 New test: Workflow job using Analysis Collector (with findbugs and checkstyle)

          Code changed in jenkins
          User: Antonio Muñiz
          Path:
          src/main/java/org/jenkinsci/test/acceptance/po/Job.java
          src/main/java/org/jenkinsci/test/acceptance/po/WorkflowJob.java
          src/test/java/plugins/AnalysisCollectorPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/c0aeb6d399385ebc8969181033661e7b0adab599
          Log:
          JENKINS-30390 Use a workflow step to copy resources to the current workspace

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Antonio Muñiz Path: src/main/java/org/jenkinsci/test/acceptance/po/Job.java src/main/java/org/jenkinsci/test/acceptance/po/WorkflowJob.java src/test/java/plugins/AnalysisCollectorPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/c0aeb6d399385ebc8969181033661e7b0adab599 Log: JENKINS-30390 Use a workflow step to copy resources to the current workspace

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          src/main/java/org/jenkinsci/test/acceptance/po/Job.java
          src/main/java/org/jenkinsci/test/acceptance/po/WorkflowJob.java
          src/test/java/plugins/AnalysisCollectorPluginTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/b27c150f35a386dfced4a5960127bf62f9c34363
          Log:
          Merge pull request #40 from amuniz/JENKINS-30390

          JENKINS-30390 Added test case using Analysis Collector with workflow.

          Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/45c104f85dd4...b27c150f35a3

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/org/jenkinsci/test/acceptance/po/Job.java src/main/java/org/jenkinsci/test/acceptance/po/WorkflowJob.java src/test/java/plugins/AnalysisCollectorPluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/b27c150f35a386dfced4a5960127bf62f9c34363 Log: Merge pull request #40 from amuniz/ JENKINS-30390 JENKINS-30390 Added test case using Analysis Collector with workflow. Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/45c104f85dd4...b27c150f35a3

            drulli Ulli Hafner
            integer Kanstantsin Shautsou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: