ExceptionInInitializerError

Help
John B.
2010-04-12
2014-04-09
  • John B.

    John B. - 2010-04-12

    Greetings,

    I'm trying out FindBugs for the first time. The manual says,

    The preferred method of running FindBugs is to directly execute $FINDBUGS_HOME/lib/findbugs.jar … The general syntax of invoking FindBugs directly is the following: java  -jar $FINDBUGS_HOME/lib/findbugs.jar options…

    I tried running "java -jar findbugs.jar" from inside the lib directory.  Here is the result:

    C:\standalone programs\findbugs-1.3.9\lib>java -jar findbugs.jar
    Exception in thread "main" java.lang.ExceptionInInitializerError
            at edu.umd.cs.findbugs.Project.<clinit>(Project.java:86)
            at edu.umd.cs.findbugs.FindBugsCommandLine.<init>(FindBugsCommandLine.java:47)
            at edu.umd.cs.findbugs.FindBugsCommandLine.<init>(FindBugsCommandLine.java:75)
            at edu.umd.cs.findbugs.gui2.GUI2CommandLine.<init>(GUI2CommandLine.java:42)
            at edu.umd.cs.findbugs.gui2.Driver.<clinit>(Driver.java:42)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Unknown Source)
            at edu.umd.cs.findbugs.LaunchAppropriateUI.launch(LaunchAppropriateUI.java:112)
            at edu.umd.cs.findbugs.LaunchAppropriateUI.main(LaunchAppropriateUI.java:197)
    Caused by: java.lang.NullPointerException
            at edu.umd.cs.findbugs.DetectorFactoryCollection.inferFindBugsHome(DetectorFactoryCollection.java:271)
            at edu.umd.cs.findbugs.DetectorFactoryCollection.getFindBugsHome(DetectorFactoryCollection.java:289)
            at edu.umd.cs.findbugs.PluginLoader.loadFromFindBugsPluginDir(PluginLoader.java:205)
            at edu.umd.cs.findbugs.PluginLoader.getCoreResource(PluginLoader.java:173)
            at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:70)
            at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:53)
            ... 9 more
    C:\standalone programs\findbugs-1.3.9\lib>
    

    I also tried the -gui option and increasing the memory with -Xmx, and no luck.  Can anyone help me figure out what's wrong?  Thanks a ton!

    - John

     
  • bethany

    bethany - 2012-03-13

    You should input the absolute path of findbugs.jar

     
  • Jinal Kothari

    Jinal Kothari - 2014-04-09

    Had the same issue, using the absolute path for the findbugs.java file does the job. Thanks.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks