logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: Exception running findbugs ant task: msg#00059

java.findbugs.general

Subject: Re: Exception running findbugs ant task

OK, we'll get this resolved quickly and release FB 1.1.3.

Bill

On Dec 25, 2006, at 6:43 PM, Alex Chapman wrote:

I'm a new findbugs user. I've installed findbugs-1.1.2 and
successfully used the gui on my project to identify bugs. Now I'm
trying to add it to my ant build, and I get an error.

I've defined the task, and added a findbugs target

<target name="findbugs">
<findbugs home="${findbugs.home}"
output="xml"
outputFile="${findbugs.dir}/findbugs-report.xml" >
<sourcePath path="${build.src.dir}" />
<class location="${build.classes.dir}" />
</findbugs>
</target>

but when I run this target I get the following

Buildfile: build.xml

findbugs:
[findbugs] Running FindBugs...
[findbugs] Error: The findbugs.home property is not set!
[findbugs] Exception in thread "main" java.lang.ExceptionInInitializerError
[findbugs] at
edu.umd.cs.findbugs.TextUICommandLine.<init>(TextUICommandLine.java: 78)
[findbugs] at edu.umd.cs.findbugs.FindBugs2.main(FindBugs2.java: 681)
[findbugs] Caused by: java.lang.NullPointerException
[findbugs] at
edu.umd.cs.findbugs.DetectorFactoryCollection.loadPlugins (DetectorFactoryCollection.java:250)
[findbugs] at
edu.umd.cs.findbugs.DetectorFactoryCollection.ensureLoaded (DetectorFactoryCollection.java:214)
[findbugs] at
edu.umd.cs.findbugs.DetectorFactoryCollection.instance (DetectorFactoryCollection.java:99)
[findbugs] at
edu.umd.cs.findbugs.config.ProjectFilterSettings.<init> (ProjectFilterSettings.java:93)
[findbugs] at
edu.umd.cs.findbugs.config.ProjectFilterSettings.createDefault (ProjectFilterSettings.java:110)
[findbugs] at
edu.umd.cs.findbugs.config.UserPreferences.<init> (UserPreferences.java:75)
[findbugs] at
edu.umd.cs.findbugs.config.UserPreferences.<clinit> (UserPreferences.java:72)
[findbugs] ... 2 more
[findbugs] Output saved to dist/reports/findbugs/findbugs-report.xml

BUILD SUCCESSFUL
Total time: 0 seconds

The error says that findbugs.home is not set, but I'm sure it is. I've
used echoproperties to confirm, and if I change the value, then it
correctly reports an error that it cannot find findbugs.jar. So is
there something else that I'm forgetting to do? Is there anything else
I can try to figure this out? I'm running on Windows XP with
jdk1.5.0_10 and apache-ant-1.7.0.

Thanks for any help,

Alex Chapman
_______________________________________________
Findbugs-discuss mailing list
Findbugs-discuss@xxxxxxxxxxxxxxxxxx
http://mailman.cs.umd.edu/mailman/listinfo/findbugs-discuss






Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo