• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Critical Critical
    • findbugs-plugin, pmd-plugin
    • None
    • windows server 2012 R2 and windows7

      I have upgraded Jenkins to version 1.565.2 and after that when we are running Findbugs and PMD jobs they are failing with nullpointer exception code snippet is shown below

      [FINDBUGS] Collecting findbugs analysis files...
      ERROR: Publisher hudson.plugins.findbugs.FindBugsPublisher aborted due to exception
      java.lang.NullPointerException
      at org.apache.commons.digester3.Digester.getXMLReader(Digester.java:799)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
      at hudson.plugins.findbugs.parser.FindBugsParser.preParse(FindBugsParser.java:229)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:187)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:172)
      at hudson.plugins.findbugs.parser.FindBugsParser.parse(FindBugsParser.java:140)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:300)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:258)
      at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:209)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:178)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)
      [PMD] Collecting PMD analysis files...
      ERROR: Publisher hudson.plugins.pmd.PmdPublisher aborted due to exception
      java.lang.NullPointerException
      at org.apache.commons.digester3.Digester.getXMLReader(Digester.java:799)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1642)
      at org.apache.commons.digester3.Digester.parse(Digester.java:1701)
      at hudson.plugins.pmd.parser.PmdParser.parse(PmdParser.java:70)
      at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:53)
      at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:300)
      at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:258)
      at hudson.plugins.analysis.core.FilesParser.parserCollectionOfFiles(FilesParser.java:209)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:178)
      at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
      at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2474)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:328)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:63)
      at java.lang.Thread.run(Unknown Source)

          [JENKINS-24743] Findbug and PMD are broken in Jenkins 1.565.2

          the job is started on a slave node. I cleared the log and run the job again and digester log record is back to what it was previously in my comment from 04/Feb/15 1:17 PM ... Something strange is happening here...

          Sylwia Kludacz added a comment - the job is started on a slave node. I cleared the log and run the job again and digester log record is back to what it was previously in my comment from 04/Feb/15 1:17 PM ... Something strange is happening here...

          how can I check if xml-api is included in my Jenkins?

          Sylwia Kludacz added a comment - how can I check if xml-api is included in my Jenkins?

          Ulli Hafner added a comment -

          In the WEB-INF/lib folder of the findbugs plugin there should be a library: xml-apis-1.4.01.jar

          Can you please try to build the job without slave, I think the classloader in this Jenkins versions was quite new (and buggy?).

          Ulli Hafner added a comment - In the WEB-INF/lib folder of the findbugs plugin there should be a library: xml-apis-1.4.01.jar Can you please try to build the job without slave, I think the classloader in this Jenkins versions was quite new (and buggy?).

          xml-apis-1.4.01.jar exists, so that's not the issue. The master has been restricted not to run any jobs and it doesn't have Perforce installed for example. I think I try to upgrade Jenkins tomorrow to 1.580.3 as suggested by you before.

          Sylwia Kludacz added a comment - xml-apis-1.4.01.jar exists, so that's not the issue. The master has been restricted not to run any jobs and it doesn't have Perforce installed for example. I think I try to upgrade Jenkins tomorrow to 1.580.3 as suggested by you before.

          I've upgraded Jenkins to latest 1.598 version but this didn't help

          Sylwia Kludacz added a comment - I've upgraded Jenkins to latest 1.598 version but this didn't help

          Ulli Hafner added a comment -

          How do you connect slave and master? Is your slave a Windows client with the same java version? Is the slave.jar up-to-date? Would it be possible to build my plug-in (run unit tests) on your slave in order to see if this is a general problem or a problem caused by Jenkins classloader?

          Ulli Hafner added a comment - How do you connect slave and master? Is your slave a Windows client with the same java version? Is the slave.jar up-to-date? Would it be possible to build my plug-in (run unit tests) on your slave in order to see if this is a general problem or a problem caused by Jenkins classloader?

          The problem seems to be related to slave node and I was able to run the same job on different slave successfully. What exactly on the slave node is causing this issue I don't know yet as it is using the same java version as server. Will need to investigate this further

          Sylwia Kludacz added a comment - The problem seems to be related to slave node and I was able to run the same job on different slave successfully. What exactly on the slave node is causing this issue I don't know yet as it is using the same java version as server. Will need to investigate this further

          Jar may exist but will be not used.
          Please check that you have no plugins that do classloading before core classloading.

          Kanstantsin Shautsou added a comment - Jar may exist but will be not used. Please check that you have no plugins that do classloading before core classloading.

          Ulli Hafner added a comment -

          Is this still a problem, then please reopen. I can't reproduce it.

          Ulli Hafner added a comment - Is this still a problem, then please reopen. I can't reproduce it.

          This problem has been resolved now and it was related to xerces on Jenkins server. There were two instances of the xercesImpl.jar file on the server, one in the endorsed directory and one in the ext directory.
          It looks like Jenkins was loading the one from the endorsed directory first, the endorsed directory didn’t have the xml-apis.jar file which has dependency links from the xercesImpl.jar library.
          By deleting the lib from the endorsed folder it resolved the issue.

          Sylwia Kludacz added a comment - This problem has been resolved now and it was related to xerces on Jenkins server. There were two instances of the xercesImpl.jar file on the server, one in the endorsed directory and one in the ext directory. It looks like Jenkins was loading the one from the endorsed directory first, the endorsed directory didn’t have the xml-apis.jar file which has dependency links from the xercesImpl.jar library. By deleting the lib from the endorsed folder it resolved the issue.

            drulli Ulli Hafner
            bhnau_pathak bhanu pathak
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: