Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1116031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T03:14:36+00:00 2026-05-17T03:14:36+00:00

Findbugs reports this: findbugs: [findbugs] Executing findbugs from ant task [findbugs] Running FindBugs… [findbugs]

  • 0

Findbugs reports this:

findbugs:
 [findbugs] Executing findbugs from ant task
 [findbugs] Running FindBugs...
 [findbugs] The following classes needed for analysis were missing:
 [findbugs]   com.company.OptionalClass
 [findbugs] Warnings generated: 11
 [findbugs] Missing classes: 2
 [findbugs] Calculating exit code...
 [findbugs] Setting 'missing class' flag (2)
 [findbugs] Setting 'bugs found' flag (1)
 [findbugs] Exit code set to: 3
 [findbugs] Java Result: 3
 [findbugs] Classes needed for analysis were missing
 [findbugs] Output saved to findbugs.xml
BUILD SUCCESSFUL

This OptionalClass is referenced from a third-party jar for which I do not have the source code, and for which I do not want a findbugs analysis. It refers to a class I do not have in my classpath, or anywhere else. This class is probably used in certain cases, when our third-party jar is configured in a certain way.

Is there a way to tell findbugs to ignore this class?

Note that it completes the analysis and produces a findbugs.xml report, so this is a minor issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T03:14:37+00:00Added an answer on May 17, 2026 at 3:14 am

    This message appears because somewhere in your binary classes you are referencing that class. It does not necessarily mean that FindBugs was trying to analyse com.company.OptionalClass to report on it; rather it is more likely FindBugs was analysing it to get more information about the class which references it.

    Consider some of your source code, which you do want analysed:

    package my.actual.codebase;
    import com.some.third.party.stuff.OptionalClass;
    
    class ReferencesOptionalClass extends OptionalClass {}
    

    This kind of example is common with test classes, which reference e.g. org.junit.@Test but the JUnit jar is not included in what you want to analyse.

    In the above example you do want results for ReferenceOptionalClass, but in order to get them, some parts of FindBugs need to look at OptionalClass. If it can’t do that, because it’s not there, it reports that the class is missing[1]. When FindBugs can’t find that class, it generally just aborts the specific kind of analysis it was trying to do, and carries on with the rest of the analysis without problem.

    The simple answer is if you are happy with the level of analysis FindBugs is giving you, then just ignore the error.

    [1] Note that it’s likely that this could even be a transitive reference i.e. your code includes class A, which references B in an auxiliary JAR, which then references OptionalClass.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.