This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Testing and the fly likes findbugs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "findbugs "no classes found" error" Watch "findbugs "no classes found" error" New topic

findbugs "no classes found" error

Michael Van
Ranch Hand

Joined: Nov 25, 2003
Posts: 33

I've been scouring the 'boards looking for an answer to this question, but all I see is the question repeated with no useful feedback. I'm hoping that you JavaRanch folks will be able to help.

I have findbugs set-up and running as its own task in Ant. The problem is that when I attempt to run it against a .ear file, it gives me the "no classes found" error. However, when I run it against a .jar file, it behaves as I would expect it to.

The problem is, I'm using findbugs 1.3.x, and the issue with findbugs not being able to read .ear files was fixed in 0.6.2. Is there any chance one of you fine folks could help me with this?

The first person to respond with a useful solution gets a secret prize!

Mike Van
Apache Software Foundation Committer
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
I'd probably download the sources for your version of FindBugs and grep the source code for ".jar" or "java.util.jar" or something like that - try to find the place where FindBugs figures out what to do with a given file.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Michael Van
Ranch Hand

Joined: Nov 25, 2003
Posts: 33
Turns out the real problem was that instead of pointing the class attrib at the .ear file, I should have pointed it at the directory containing the .class files. Who'd have known that running Findbugs as documented wouldn't work? Meh.
I agree. Here's the link:
subject: findbugs "no classes found" error
jQuery in Action, 3rd edition