Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: warnings-ng-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.138.3
      Warnings NG 1.0.0-beta5
      Redhat 7 Host
      Tomcat 9.0.8
      JDK 1.8.0_172
    • Similar Issues:

      Description

      We've traditionally used the individual plugins (PMD, Findbugs) but came across this when one of our projects moved from Findbugs to Spotbugs.  We really like how the report looks and we're keen to use it in place of the older plugins...

      I've run into some trouble using the Findbugs option on the new plugin.  When I try to collect findbugs information I get this:
      [FindBugs] [ERROR] Parsing of file 'xxxxx' failed due to an exception:

      org.dom4j.DocumentException: Sax error Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
      at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:391)
      at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:368)
      at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:355)
      at edu.hm.hafner.analysis.parser.FindBugsParser.readXml(FindBugsParser.java:230)
      at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:175)
      at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:111)
      at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:97)
      at edu.hm.hafner.analysis.IssueParser.parse(IssueParser.java:70)
      at io.jenkins.plugins.analysis.core.util.FilesScanner.aggregateIssuesOfFile(FilesScanner.java:101)
      at io.jenkins.plugins.analysis.core.util.FilesScanner.scanFiles(FilesScanner.java:85)
      at io.jenkins.plugins.analysis.core.util.FilesScanner.invoke(FilesScanner.java:68)
      at io.jenkins.plugins.analysis.core.util.FilesScanner.invoke(FilesScanner.java:29)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3085)
      at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      at hudson.remoting.Request$2.run(Request.java:369)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
       

      The strange part is if I copy the findbugs xml files to a different job I don't get the error.  The plugin does complain about not being able to find the source but it still process the data and gives me a nice report.  I guess the issue is being triggered when the plugin attempts to parse through the source code.

       

      just an addition here.  I'm seeing the same issue when I try and use spotbugs...  I know that isn't a surprise, but I thought I'd post it.
      [SpotBugs] [ERROR] Parsing of file '...' failed due to an exception: 14:41:22 14:41:22 org.dom4j.DocumentException: Sax error Nested exception: SAX2 driver class org.apache.xerces.parsers.SAXParser not found*14:41:22* at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:391)14:41:22 at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:368)14:41:22 at edu.umd.cs.findbugs.SortedBugCollection.readXML(SortedBugCollection.java:355)14:41:22 at edu.hm.hafner.analysis.parser.FindBugsParser.readXml(FindBugsParser.java:230)14:41:22 at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:175)14:41:22 at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:111)14:41:22 at edu.hm.hafner.analysis.parser.FindBugsParser.parse(FindBugsParser.java:97)14:41:22 at edu.hm.hafner.analysis.IssueParser.parse(IssueParser.java:70)14:41:22 at io.jenkins.plugins.analysis.core.util.FilesScanner.aggregateIssuesOfFile(FilesScanner.java:101)14:41:22 at io.jenkins.plugins.analysis.core.util.FilesScanner.scanFiles(FilesScanner.java:85)14:41:22 at io.jenkins.plugins.analysis.core.util.FilesScanner.invoke(FilesScanner.java:68)14:41:22 at io.jenkins.plugins.analysis.core.util.FilesScanner.invoke(FilesScanner.java:29)14:41:22 at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3085)14:41:22 at hudson.remoting.UserRequest.perform(UserRequest.java:212)14:41:22 at hudson.remoting.UserRequest.perform(UserRequest.java:54)14:41:22 at hudson.remoting.Request$2.run(Request.java:369)14:41:22 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)14:41:22 at java.util.concurrent.FutureTask.run(FutureTask.java:266)14:41:22 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)14:41:22 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)14:41:22 at java.lang.Thread.run(Thread.java:748)14:41:22 Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found*14:41:22* java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser*14:41:22* at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)14:41:22 at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191)14:41:22 at edu.umd.cs.findbugs.SortedBugCollection.doReadXML(SortedBugCollection.java:388)14:41:22 ... 20 more

        Attachments

          Issue Links

            Activity

            Hide
            mwilson Matt Wilson added a comment -

            Thanks for the update!

            Your change seems to have corrected my spotbugs reporting issue.  Output looks pretty nice.

            I did a scan of my logs for "System property org.xml.sax.driver has been set but should be empty"

            and just "org.xml.sax.driver"

            both returned nothing.  Let me know if you need more info.

            Show
            mwilson Matt Wilson added a comment - Thanks for the update! Your change seems to have corrected my spotbugs reporting issue.  Output looks pretty nice. I did a scan of my logs for "System property org.xml.sax.driver has been set but should be empty" and just "org.xml.sax.driver" both returned nothing.  Let me know if you need more info.
            Hide
            asselmeyer Christian Asselmeyer added a comment -

            I can report the same. SpotBugs reporting works again with 1.0.0-beta6, greping logs for org.xml.sax.driver does not yield any results.

            Show
            asselmeyer Christian Asselmeyer added a comment - I can report the same. SpotBugs reporting works again with 1.0.0-beta6, greping logs for org.xml.sax.driver does not yield any results.
            Hide
            drulli Ulli Hafner added a comment -

            Did you look at the agent log? It is accessible from [jenkins]/computers/[node]/log. In warnings-ng 1.0.0-beta7 and analysis-model-api-beta16 I added a log line if everything is ok as well, so there must be some output from my plugin now.

            Show
            drulli Ulli Hafner added a comment - Did you look at the agent log? It is accessible from [jenkins] /computers/ [node] /log. In warnings-ng 1.0.0-beta7 and analysis-model-api-beta16 I added a log line if everything is ok as well, so there must be some output from my plugin now.
            Hide
            asselmeyer Christian Asselmeyer added a comment -

            I updated to 1.0.0-beta8 and now the agent log shows these messages:

            Dec 18, 2018 1:35:07 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties
            WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file.
            Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties
            WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file.
            Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties
            WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file.
            Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties
            WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file.
            ...
            Show
            asselmeyer Christian Asselmeyer added a comment - I updated to 1.0.0-beta8 and now the agent log shows these messages: Dec 18, 2018 1:35:07 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file. Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file. Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file. Dec 18, 2018 1:35:10 PM edu.hm.hafner.analysis.parser.FindBugsParser logSaxProperties WARNING: Default SAX parser will be used to parse FindBugs/SpotBugs file. ...
            Hide
            drulli Ulli Hafner added a comment -

            Hmm, that is strange. I hoped that something else would show up. That message means that the JDK default SAX parser is used and not the Xerces bundled library. But maybe the message changes later on if another tool changes the property.

            Is anyone else getting such messages?

            Show
            drulli Ulli Hafner added a comment - Hmm, that is strange. I hoped that something else would show up. That message means that the JDK default SAX parser is used and not the Xerces bundled library. But maybe the message changes later on if another tool changes the property. Is anyone else getting such messages?

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                mwilson Matt Wilson
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: