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

Findbugs throws FNFE for source files

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • findbugs-plugin
    • None
    • Platform: All, OS: All

    Description

      Findbugs plugin throws FileNotFoundException for some of the files even though
      the path is correct. Below is a snippet of the exception:

      [FINDBUGS] Can't copy source file:
      source=workspace/rel-1.1-may_2009/src/main/java/com/acn/repmgmt/euonlinerepagmt/business/ApplicationDataBD.java,
      destination=a27250b0.tmp
      java.io.FileNotFoundException:
      workspace/rel-1.1-may_2009/src/main/java/com/acn/repmgmt/euonlinerepagmt/business/ApplicationDataBD.java
      (No such file or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at hudson.FilePath$25.invoke(FilePath.java:991)
      at hudson.FilePath$25.invoke(FilePath.java:987)
      at hudson.FilePath.act(FilePath.java:552)
      at hudson.FilePath.copyTo(FilePath.java:987)
      at hudson.FilePath.copyTo(FilePath.java:975)
      at
      hudson.plugins.findbugs.util.HealthAwareMavenReporter.copyFilesToMaster(HealthAwareMavenReporter.java:206)
      at
      hudson.plugins.findbugs.util.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:164)

      It doesn't fail the build and reports the statistics correctly. So, it is not a
      big problem. But it is annoying to see so many exceptions in the log.

      Attachments

        Issue Links

          Activity

            drulli Ulli Hafner added a comment -

            Hudson currently supports not the site goal in the same way as the other goals.
            So in this case I can't read or modify the maven findbugs configuration in the pom.

            I think the following workaround should be easy to implement:
            When the m2 build uses the site goal, then I'm assuming that the user defined
            the right findbugs properties in the pom, producing a findbugsXml.xml file. If I
            can't find or read that file then I'm failing the build with an exception and
            message that the pom needs to be modified manually.

            What do you think?

            drulli Ulli Hafner added a comment - Hudson currently supports not the site goal in the same way as the other goals. So in this case I can't read or modify the maven findbugs configuration in the pom. I think the following workaround should be easy to implement: When the m2 build uses the site goal, then I'm assuming that the user defined the right findbugs properties in the pom, producing a findbugsXml.xml file. If I can't find or read that file then I'm failing the build with an exception and message that the pom needs to be modified manually. What do you think?
            shibug shibug added a comment -

            Before you do that, were you able to reproduce the problem at your end?

            shibug shibug added a comment - Before you do that, were you able to reproduce the problem at your end?
            drulli Ulli Hafner added a comment -

            Actually I just looked at my code Then I've seen that the site goal will
            always use the findbugs.xml file.

            I didn't find the time to run the tests yet but I already use the site goal in
            one of my jobs in my test setup...

            drulli Ulli Hafner added a comment - Actually I just looked at my code Then I've seen that the site goal will always use the findbugs.xml file. I didn't find the time to run the tests yet but I already use the site goal in one of my jobs in my test setup...
            shibug shibug added a comment -

            Can you make your code to look for findbugsXml.xml file when running as a site
            goal. I think that may do the trick.

            shibug shibug added a comment - Can you make your code to look for findbugsXml.xml file when running as a site goal. I think that may do the trick.

            Code changed in hudson
            User: : drulli
            Path:
            trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java
            http://fisheye4.cenqua.com/changelog/hudson/?cs=17897
            Log:
            [FIXED JENKINS-3511] Assume that maven site is producing the 'findbugsXml.xml' file format.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : drulli Path: trunk/hudson/plugins/findbugs/src/main/java/hudson/plugins/findbugs/FindBugsReporter.java http://fisheye4.cenqua.com/changelog/hudson/?cs=17897 Log: [FIXED JENKINS-3511] Assume that maven site is producing the 'findbugsXml.xml' file format.

            People

              drulli Ulli Hafner
              shibug shibug
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: