-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ant-Task NPE when data directory is empty #2801
Comments
Any chance you could run with the Ant |
Sure! You find the full debug log attached [Removed as no longer necessary]. data.directory occurs three times:
Of course the last one is the one I intended to use (and purged before running the build). My wild guess would be that the data.directory is not the problem but the root cause of the problem can be found in line 4118ff ("resource data/initialize.sql not found"):
|
And that would be the problem - I missed an update. I'll release 6.0.1 shortly. |
Thanks, Jeremy! |
I just tried the 6.0.1 release and the problem persists for me. It also fails if I don't purge my data.dir but let the database produced by 5.3.2 remain in that directory. Then dependency-check tries to load an upgrade sql file (resource data/upgrade_4.1.sql) which also can't be loaded (though contained in the depedency-check-core-6.0.1.jar); see stacktrace below. Has anything changed with classloaders or classpaths (apart from library-version changes) between 5.3 and 6.0? Another detail: I have only put the files from the distribtion's dependency-check-ant/lib/ directory into the runtime classpath of the ant-task. The dependency-check-ant.jar from the dependency-check-ant/ directory is not present there. Should it be?
|
Describe the bug
I read about the CVE database incompatibility between 5.3 and 6.0.0, so I purged the dependency-check data directory. Subsequently the dependency-check Ant-Task fails with a NPE as the
database
-Property of theEngine
-class seems to benull
(see stacktrace below). If the data directory is populated - e.g. by the Gradle-Plugin 6.0.0 (that does NOT have this issue) - the Ant task works again.My build uses an explicitly set data directory. However, the problem also occurs when I don't set the data directory.
The entire task definition is as follows:
Version of dependency-check used
The exception occurs using version 6.0.0 of the Ant-Plugin. The Ant build runs with JDK 1.8 and Apache Ant 1.10.8.
Log file
Stacktrace:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The dependency-check Ant tasks is able to downloads all CVE data and populate it's data directory before executing the actual analysis.
Additional context
Engine
-class isnull
in line 1241. However, it's initialization in theopenDatabase
-method does not log any error/output, so the actual cause of this problem is not clear from the log.The text was updated successfully, but these errors were encountered: