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

Run DSL locally broken on Ubuntu: job-dsl-core-*-jar-with-dependencies.jar No signature of method: static javaposse.jobdsl.dsl.AbstractDslScriptLoader.getPackages()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • job-dsl-plugin
    • Ubuntu 22.04 and 24.04

      openjdk-21, openjdk-17, temurin-17, oracle-21

      All version of job-dsl-core-x.yy-jar-with-dependencies.jar file.

      When following the instructions in https://github.com/jenkinsci/job-dsl-plugin/wiki/User-Power-Moves#run-a-dsl-script-locally to generate a DSL file locally, the java invocation fails with:

       

      Exception in thread "main" java.lang.reflect.InvocationTargetException
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      at com.simontuffs.onejar.Boot.run(Boot.java:313)
      at com.simontuffs.onejar.Boot.main(Boot.java:161)
      Caused by: javaposse.jobdsl.dsl.DslScriptException: (Boot.java, line 313) No signature of method: static javaposse.jobdsl.dsl.AbstractDslScriptLoader.getPackages() is applicable for argument types: () values: []
      at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
      at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
      at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:60)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:235)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:255)
      at javaposse.jobdsl.dsl.AbstractDslScriptLoader.runScriptEngine(AbstractDslScriptLoader.groovy:114)
      at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

       

      This has happened since the first inclusion of the job-dsl-core-X.YY-jar-with-dependencies.jar. The prevous standalone jar worked just fine.

       

            basil Basil Crow
            jrivero Jose Luis Rivero
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: