|License Type||SaaS & On-Premise|
|Agent Mode||Assess & Protect|
|Main Product Category||Contrast UI|
|Sub Category||Library Analysis|
Your application has started successfully with the Contrast agent. However, the Application and the Server entry in the Contrast UI is reporting 0 libraries and/or lines of code for the app.
The inventory data, which includes the libraries and line of code count is sent when we see the first http traffic hit the application. As such, one of the most common causes of this issue is that the application has not yet been browsed/exercised.
Please hit any URL from your application. This can be via a browser or simply with CURL or similar tool. Once the site is visited for the first time, Contrast will spend a few seconds analysing it before sending the inventory information to the Contrast server. You should then see the inventory data appear in the Contrast UI.
If you're still not seeing this data after exercising the application, we'll need a little more information to figure out why:
- What frameworks is the application using?
- What app server is the application running on and how is it started? For example: Springboot, DropWizard etc. The agent hooks into the class loader when reporting libraries, so if it's unrecognised it can prevent us from sending the inventory data to the Contrast server.
- How is the application packaged? For example: fat jar, .war, .ear, etc.
- The actual location/path to the libraries within the application.
- We'll likely need to take a look at a debug log to see exactly what's happening during the startup. If possible, please add the following properties to the JVM options and restart the app:
Please submit a ticket with you answers and a member of the Contrast Support team will be able to assist further.