jenkinsci / jenkinsfile-runner

A command line tool to run Jenkinsfile as a function
MIT License
1.14k stars 296 forks source link

NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/properties/DurabilityHintJobProperty #10

Closed schnatterer closed 6 years ago

schnatterer commented 6 years ago

When building with today's default plugins a NoClassDefFoundError occurs when running the Jenkinsfile shown in the usage section of the README.

This must be somehow related to default plugins, because when running with the default plugins from 2018-02-25 the pipeline runs successfully. (I extracted the plugins from a docker image I built two weeks ago, schnatterer/jenkinsfile-runner:1.0-SNAPSHOT-2.108)

jenkinsfile-runner built from git commit ae14205 Tested with jenkins 2.108.

Stacktrace:

   6.054 [id=1] SEVERE  h.i.i.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler#uncaughtException: A thread (main/1) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
java.lang.ClassNotFoundException: org.jenkinsci.plugins.workflow.job.properties.DurabilityHintJobProperty
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Caused: java.lang.NoClassDefFoundError: org/jenkinsci/plugins/workflow/job/properties/DurabilityHintJobProperty
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at io.jenkins.jenkinsfile.runner.App$1.evaluate(App.java:28)
        at io.jenkins.jenkinsfile.runner.JenkinsfileRunnerRule$2.evaluate(JenkinsfileRunnerRule.java:127)
        at io.jenkins.jenkinsfile.runner.App.run(App.java:32)
        at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.run(Bootstrap.java:61)
        at io.jenkins.jenkinsfile.runner.bootstrap.Bootstrap.main(Bootstrap.java:51)
schnatterer commented 6 years ago

@ndeloof could you plz merge your commit that closed this issue?