Page tree
Skip to end of metadata
Go to start of metadata

On this page:

Target audience:

CAST Administrators

Summary: this page explains how to use the standalone GUI based or CLI based tools to manually manage data for the CAST Application Engineering Dashboard.

Introduction

Either you launch the GUI tools, that provide you an interface to launch the process, or you use the CLI application in a batch file to launch the processes:

 

Synchronize data for component investigation in AED

Synchronize data for viewing in portals populates SQL tables needed to see the component browser information in the AED. If data is not synchronized, this module will display no data in the portal. The data is historized for each snapshot.

Synchronize data for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed Synchronize snapshot data" radio button
  2. set the parameters to connect to the central schema and the snapshot id
  3. click on run application

CLI : use AedConsolidation.exe

The command line should be like this :

AedConsolidation.exe -synchronize -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 2

Synchronize data for all applications in one central or if you don't know the snapshot id

use the snapshot_id = -1 for the tool to synchronize data for the latest snapshot of all applications that exists in your central schema.

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed Synchronize snapshot data" radio button
  2. set the parameters to connect to the central schema
  3. set the snapshot to "-1"
  4. click on run application

CLI : use AedConsolidation.exe

AedConsolidation.exe -synchronize -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Delete data for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed Delete snapshot data" radio button
  2. set the parameters to connect to the central schema and the snapshot id
  3. click on run application

CLI : use AedConsolidation.exe

AedConsolidation.exe -delete -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3

Delete data for all applications in one central

use the snapshot_id = -1 for the tool to truncate all tables concerning those specific data.

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed Delete snapshot data" radio button
  2. set the parameters to connect to the central schema
  3. set the snapshot to "-1"
  4. click on run application

CLI : use AedConsolidation.exe

AedConsolidation.exe -delete -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Upload sources for viewing violations in source code viewer of AED 

Upload sources does not only upload the source code of objects from loacl schema to central schema, but it also upload the positions and bookmarks found by diagnostics.

The upload source take only the latest snapshot of the application. Sources are not historized. The implication is if you delete the latest snapshot in CMS, you will lost the source. As source code is not historized in the local schema, even the consolidation of the previous snapshot cannot upload sources. You have to do a new snapshot to get the source.

If sources have not been uploaded, source code for violations will not be available in AED portal.

Upload source for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed upload sources in central schema" radio button
  2. set the parameters to connect to the central schema and the snapshot id concerned
  3. set the paramaters to connect to the local schema
  4. run the application

CLI : use AedConsolidation.exe

AedConsolidation.exe -uploadsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3 -local_driver org.postgresql.Driver -local_url jdbc:postgresql://localhost:2280/postgres -local_schema my_local -local_user operator -local_password CastAIP 

Upload source for all applications in one central or if you don't know the snapshot id

use the snapshot_id = -1 for the tool to upload sources for the latest snapshot of all applications that exists in your central schema.

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed upload sources in central schema" radio button
  2. set the parameters to connect to the central schema
  3. set the snapshot to "-1"
  4. set the paramaters to connect to the local schema
  5. run the application

CLI : use AedConsolidation.exe

AedConsolidation.exe -uploadsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1 -local_driver org.postgresql.Driver -local_url jdbc:postgresql://localhost:2280/postgres -local_schema my_local -local_user operator -local_password CastAIP 

Delete sources for one snapshot

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed delete sources in central schema" radio button
  2. set the parameters to connect to the central schema and the snapshot id
  3. run the application

CLI : use AedConsolidation.exe

AedConsolidation.exe -delsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id 3

Delete sources for all applications in one central

use the snapshot_id = -1 for the tool to truncate all sources from your central schema.

GUI : launch AedConsolidation-GUI.exe

  1. check the "Aed delete sources in central schema" radio button
  2. set the parameters to connect to the central schema 
  3. set the snapshot to "-1"
  4. run the application

CLI : use AedConsolidation.exe

AedConsolidation.exe -delsrc -driver org.postgresql.Driver -url jdbc:postgresql://localhost:2280/postgres -schema my_central -user operator -password CastAIP -snapshot_id -1

Troubleshooting

Out of memory from Java virtual machine

If you encounter some troubles from the jvm due to huge number of sources in your application, you have to create a launch4j.ini file to raise the heap size of the java virtual machine.

This file has to be created near the exe concerned and should be named as the exe : for AedConsolidation.exe, the file should be named AedConsolidation.l4j.ini, for AedConsolidation-GUI.exe it should be named AedConsolidation-GUI.l4j.ini.

Its content should be something like this, depending on the heap size needed :

# Launch4j runtime config
# -Xms<size>        set initial Java heap size
# -Xmx<size>        set maximum Java heap size
-Xms512m
-Xmx1024m

SQL queries to verify the contents of sql tables for component browser

To get the results for your snapshot :

select * from DSS_TREE_RANKING2 where snapshot_id = ?

To get the results group by snapshot_id :

select snapshot_id, count(*) from DSS_TREE_RANKING2 group by snapshot_id

If you have no results, verify that your central is not corrupted. If the following request have no results, you should reconsolidate your snapshot :

select SNAPSHOT_ID, count(*) from DSS_VIOLATION_STATUSES group by SNAPSHOT_ID order by SNAPSHOT_ID desc
select SNAPSHOT_ID, count(*) from DSS_SNAPSHOT_RANKING group by SNAPSHOT_ID order by SNAPSHOT_ID desc
select SNAPSHOT_ID, count(*) from DSS_TREE_INFO group by SNAPSHOT_ID order by SNAPSHOT_ID desc

SQL queries to verify the contents of sql tables for source code viewer

To find the applications and their latest snapshot in your central schema :

select o.object_name, d.application_id, d.snapshot_id
from dss_objects o
join adg_delta_snapshots d on d.application_id = o.object_id and d.latest = 1


To find the sources in your local schema corresponding to your application snapshot :

select distinct SOURCE_ID from local.DSS_SOURCE_POSITIONS where OBJECT_ID in (
select t.SITE_OBJECT_ID from central.DSS_TRANSLATION_TABLE t
join central.DSS_OBJECT_INFO o on t.OBJECT_ID = o.OBJECT_ID and o.SNAPSHOT_ID = ?)

To verify that sources have been uploaded, run the following queries. The first 2 should return data. The other may not, depending on your application.

select APPLICATION_ID, count(*) from DSS_SOURCE_TEXTS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_SOURCE_POSITIONS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_BOOKMARKS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_PATHS group by APPLICATION_ID;
select APPLICATION_ID, count(*) from DSS_CODE_GROUPS group by APPLICATION_ID;

Activate the debug mode

debug mode will log all sql queries in the specified log file, and write more information in the log.

Drivers for oracle central schema

If you have an oracle central schema, select the oracle driver in the list, and write the url like this :

jdbc:oracle:thin:@{server}:{port}:{instance}

Drivers for MS SQL Server central schema

If you have a ms sql server central schema, select the jtds driver in the list, and write the url like this :

jdbc:jtds:sqlserver://{host};instance={instance}
  • No labels