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

groovy.lang.GroovyRuntimeException exception after upgrade to 3.47

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: pmd-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            Hide
            drulli Ulli Hafner added a comment -

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

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

            Ulli Hafner 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?

             

             

            Show
            hobbykoch Frank Reisenhofer added a comment - Ulli Hafner 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?    
            Hide
            drulli 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?

            Show
            drulli 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?
            Hide
            hobbykoch Frank Reisenhofer added a comment -

            Ulli Hafner: 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

             

            Show
            hobbykoch Frank Reisenhofer added a comment - Ulli Hafner : 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  
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            hobbykoch Frank Reisenhofer added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: