Null pointer exception running CLI

34 views
Skip to first unread message

Tim Bond

unread,
Apr 30, 2014, 7:44:00 AM4/30/14
to dependen...@googlegroups.com
Jeremy,

Am getting a NPE running a newly downloaded/unzipped batch file . . .

C:\apps\depcheck-1.2.0\bin>dependency-check.bat
Exception in thread "main" java.lang.NullPointerException
        at org.owasp.dependencycheck.utils.Settings.getString(Settings.java:464)

        at org.owasp.dependencycheck.cli.CliParser.printHelp(CliParser.java:449)

        at org.owasp.dependencycheck.App.run(App.java:93)
        at org.owasp.dependencycheck.App.main(App.java:61)

C:\apps\depcheck-1.2.0\bin>java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

Same behavior on Ubuntu as well.

-- Tim

Tim Bond

unread,
Apr 30, 2014, 8:36:06 AM4/30/14
to dependen...@googlegroups.com
Looking like settings is not getting initialized in App.java.  This works although might be a better location for the call.  Otherwise scanner is working great.  Thx

        if (cli.isGetVersion()) {
            cli.printVersionInfo();
        } else if (cli.isRunScan()) {
            populateSettings(cli);
            runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
        } else {
            populateSettings(cli);
            cli.printHelp();

Jeremy Long

unread,
Apr 30, 2014, 8:58:27 AM4/30/14
to Tim Bond, dependen...@googlegroups.com
Tim,

Thanks for reporting this oversight. Apparently I forgot to run my "release test" script prior to the 1.2.0 release... Sorry about that. I'll have an update published tonight.

--Jeremy


--
You received this message because you are subscribed to the Google Groups "Dependency Check" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dependency-che...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeremy Long

unread,
Apr 30, 2014, 6:33:43 PM4/30/14
to dependen...@googlegroups.com, Tim Bond
The patched version of the CLI is available here: http://dl.bintray.com/jeremy-long/owasp/dependency-check-1.2.0.1-release.zip

--Jeremy
Reply all
Reply to author
Forward
0 new messages