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

groovy.lang.GroovyRuntimeException exception after upgrade to 3.47

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • pmd-plugin
    • None

      Hello together,

      Two days back we updated this plugin from version 3.46 to version 3.47.

      As a consequence we got the following error in our Jenkins pipeline [1]

      The error is been thrown at a place were we import the following libs [2]

      and execute commands like [3]

      Any idea what change in version 3.47 is causing this exception?

      Thanks for a hint.

      Best Regards

      Frank

      Remark: After a rollback to version 3.46 everything is working fine again

      [1]

      [Pipeline] echo Caught: groovy.lang.GroovyRuntimeException: DOMSource cannot be processed: check that saxon9-dom.jar is on the classpath
      [Pipeline] echo

      [2][

      import groovy.xml.DOMBuilder
      import groovy.xml.XmlUtil
      import groovy.xml.dom.DOMCategory

      [3]

          def modPom = XmlUtil.serialize(pom).toString()
          pom = null
          deps = null
          writeFile file: filePath, text: modPom

          [JENKINS-43569] groovy.lang.GroovyRuntimeException exception after upgrade to 3.47

          Ulli Hafner added a comment -

          You are not allowed to run arbitrary Groovy code anymore, all calls run in the Sandbox now.

          Ulli Hafner added a comment - You are not allowed to run arbitrary Groovy code anymore, all calls run in the Sandbox now.

          drulli Thanks for your remark.

          We found the root cause. The new *.hpi file contains a modified net.sourceforge.saxon-saxon-9.1.0.8.jar file.

          After replacing it with the version which was included in version 3.46 everything is working fine again.

          Any idea why this is causing the above Exception?

           

           

          Frank Reisenhofer added a comment - drulli Thanks for your remark. We found the root cause. The new *.hpi file contains a modified net.sourceforge.saxon-saxon-9.1.0.8.jar file. After replacing it with the version which was included in version 3.46 everything is working fine again. Any idea why this is causing the above Exception?    

          Ulli Hafner added a comment -

          What do you mean with modified? Are the versions the same but the content differs? Or is the version also different?

          Ulli Hafner added a comment - What do you mean with modified? Are the versions the same but the content differs? Or is the version also different?

          drulli: Please have a look at the attached screenshot.

          The pmd.hpi files contain different net.sourceforge.saxon-saxon-9.1.0.8.jar.

          The jar included in version 3.46 contains only  a folder named "dom".

          The jar included in version 3.47 contains a set of subdirectories. But the "dom" folder is missing.

          Adding the missing "dom" folder to the file included in version 3.47 the problem got solved.

          Maybe the following posting is helpful to find the root cause: http://stackoverflow.com/questions/15438011/domsource-cannot-be-processed-check-that-saxon9-dom-jar-is-on-the-classpath

           

          Frank Reisenhofer added a comment - drulli : Please have a look at the attached screenshot. The pmd.hpi files contain different net.sourceforge.saxon-saxon-9.1.0.8.jar. The jar included in version 3.46 contains only   a folder named "dom". The jar included in version 3.47 contains a set of subdirectories. But the "dom" folder is missing. Adding the missing "dom" folder to the file included in version 3.47 the problem got solved. Maybe the following posting is helpful to find the root cause: http://stackoverflow.com/questions/15438011/domsource-cannot-be-processed-check-that-saxon9-dom-jar-is-on-the-classpath  

          Code changed in jenkins
          User: Ulli Hafner
          Path:
          pmd.iml
          pom.xml
          src/test/java/hudson/plugins/pmd/parser/PmdMessagesTest.java
          http://jenkins-ci.org/commit/pmd-plugin/b4c522541cce7f17e12502610a8897cbf8b6993c
          Log:
          [FIXED JENKINS-43569] Exclude saxon parser. Upgrade to PMD 5.7.0.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pmd.iml pom.xml src/test/java/hudson/plugins/pmd/parser/PmdMessagesTest.java http://jenkins-ci.org/commit/pmd-plugin/b4c522541cce7f17e12502610a8897cbf8b6993c Log: [FIXED JENKINS-43569] Exclude saxon parser. Upgrade to PMD 5.7.0.

          drulli: Thanks for solving the issue. Your new version is solving this issue on our Jenkins servers.

          Frank Reisenhofer added a comment - drulli : Thanks for solving the issue. Your new version is solving this issue on our Jenkins servers.

            drulli Ulli Hafner
            hobbykoch Frank Reisenhofer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: