CAST Engineering Dashboard - Source code - Error - The source file is absent from the Local Site Page cannot be displayed

Purpose (problem description)

This page helps you to troubleshoot the following error which may occur when trying to view an object source code
“The source file associated with the object you are requesting source code for is absent from the Local Site. Page cannot be displayed. Contact portal administrator”

Applicable in CAST Version

ReleaseYes/No
8.3.x

Observed on RDBMS

RDBMSYes/No
CSS

Step by Step scenario

  1. Compute snapshot
  2. Launch CED
  3. Go to Investigation - Quality Model Drill down view
  4. Select a violated object
  5. Observe the source code of the violated object

Action Plan

  1. Check if it is expected to get the message error, for this navigate to the description of the Quality Rule:

  2. If the Quality rule is part of the AIP Corp then refer to QRL - Metrics and Quality Rules listed in alphabetical order,

  3. Else if the Quality rule is part of extensions then refer to the documentation of the extension Extending CAST AIP . For example, If no HTML file associated to an AngularJS application can be found then no bookmark will be created at all. In this situation, the following error message will be displayed in the Quality rule Avoid using unsanitized AngularJS application. For more information refer to Avoid using unsanitized AngularJS application (1020546)

  4. If the issue is with Tibco technology and you are not able to see the source code for few Tibco QRs then please check if the source code expected to be displayed is XML code (You can use the queries in next step to retrieve the source code for a particular object). If yes, then this is an issue with CED dashboard to display the XML code for Tibco technology and there is no fix for this since CED is obsolete and not recommended for use now. As a WA you can use AED to view the source code.

  5. Check if the object source code has been uploaded:

    1. Get the object id from the local schema, for this refer to SQL Queries - CAST Knowledge Base - Queries on objects - How to get the ID of an object from its object name or full name

    2. Get the id of the source file path corresponding to the object, for this run the following query on the local schema:

SELECT idfilref FROM objfilref WHERE idobj = <object_id>


      **Result sample:**

      ```sql
-- 109
  1. Get the the source file path corresponding to the object, for this run the following on the local schema:

SELECT path FROM refpath WHERE idfilref =


      **Result sample:**

      ```sql
--"C:\CASTMS\Deploy\delta_test\My Package\StrutsHelloWorld\resources\ApplicationResources.properties"
  1. Check if the source is part of the table dss_code_sources, for this run the following query on the local schema:

SELECT source_code FROM dss_code_sources WHERE source_path =


       **Result sample:**

      ```sql
package com.castsoftware.common.exceptions;

public class InitializationException extends AutomationException {
	private static final long serialVersionUID = -5351372669130950620L;

	public InitializationException(Throwable cause){
		super(cause);
	}

	public InitializationException(String msg){
		super(msg);
	}

	public InitializationException(){
	}

	public InitializationException(String msg, Throwable cause) {
		super(msg, cause);
	}
}
  If the query returns the source code of the object, then the object source code has been uploaded else the object source code has not been uploaded
  1. If the source code of the object has been uploaded then:

    1. Check the consistency of the tables dss_translation_table, dss_sites and****viewer_sites then remediate if at least one of the tables is not consistent:

      1. dss_sites table should return 2 rows per doublet (central schema&local schema), to check this run the following on the central schema:

SELECT site_id, site_type, site_name FROM dss_sites


          **Result sample:**

         ```sql
526478342;2;"delta_local"
526478343;2;"delta_local_bis"
0;1;"delta_central"
     if the query return more than 2 rows, then the table is not conssistent
  2. **viewer\_site** table should return one row per doublet (central schema&local schema), to check this run the following on the central schema:

     ```sql

SELECT * FROM viewer_sites;


         **Result sample:**

         ```sql
526478342;"";"delta_local";"operator";"GKGMIMMIDOCSFNKL";"delta_local";"org.postgresql.Driver";"postgresql";"//localhost:2280/postgres";1;"delta_local";"";""
526478343;"";"delta_local_bis";"operator";"GKGMIMMIDOCSFNKL";"delta_local";"org.postgresql.Driver";"postgresql";"//localhost:2280/postgres";1;"delta_local";"";""
     If the query return more than 1 row, then the table is not consistent.
  3. **dss\_translation\_table** should have a unic **site\_id** per doublet (central schema&local schema), to check this run the following on the central schema:

     ```sql

SELECT DISTINCT site_id FROM dss_translation_table


         **Result sample:**

         ```sql
--526478342;
--526478343;
     If the query return more than 1 row, then the table is not consistent
  4. If at least one of the tables is not consistent then perform the following:

     1. Take a backup of the triplet
     2. Delete the older site\_ids from the dss\_sites table on the central:

        ```sql

DELETE FROM dss_sites WHERE site_type=2 AND site_id NOT IN (SELECT MAX(site_id) FROM dss_sites WHERE site_type=2 );

         3. Delete the older site\_ids from the viewer\_sites table on the central:

            ```sql
 DELETE
 FROM   viewer_sites
 WHERE  id NOT IN
        (SELECT MAX(site_id)
        FROM    dss_sites
        WHERE   site_type=2
        );
     4. Update the dss\_translation table for the newest site\_id on the central:

        ```sql

UPDATE dss_translation_table SET site_id= (SELECT MAX(site_id) FROM dss_sites WHERE site_type=2 );

         5. Synchronize the local and central schema, for more information refer to [CMS - Synchronize](http://doc.castsoftware.com/display/DOC82/CMS+-+Synchronize)
         6. Upload the source to the local schema, for more information refer to [CMS - Upload Source Code](http://doc.castsoftware.com/display/DOC82/CMS+-+Upload+Source+Code+for+viewing+in+CAST+Dashboard)
         7. If the issue is not solved with the above steps then contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/requests/new). with the following [Relevant input](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-engineering-dashboard-component-ced/cast-engineering-dashboard-source-code/):
5. Else If the source code of the object has not been uploaded then:

   1. Open Cast-Ms log file, for more information about the location of the logs refer to [CAST Management Studio - Information - How to find logs](/export-v2/tg/information-guides/information-guides-by-cast-aip-component/cast-management-studio-cms/cast-management-studio-information-how-to-find-logs/)
   2. Identify the Update sources task, for this refer to [CMS Snapshot Analysis - Update Sources - Error Free Logs - CAST AIP 83](https://doc-legacy.castsoftware.com/display/TKF/CMS+Snapshot+Analysis+-++Update+Sources+-+Error+Free+Logs+-+CAST+AIP+83)
   3. Search for all the occurrence of the source file of the object under Update sources task

      1. If you find the following information:

         ```sql
INF: <Date>: 	cannot find : <source file>
     then the source file of the object was not found, for more investigation refer to [CMS Snapshot Analysis - Update Sources](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cms-snapshot-analysis-component/cms-snapshot-analysis-update-sources/)
  2. Else if you find the following information

     ```sql

INF: : cannot open :


         then the source file of the object was not opened, for more investigation refer to [CMS Snapshot Analysis - Update Sources](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cms-snapshot-analysis-component/cms-snapshot-analysis-update-sources/)
      1. Else if  you find the following warnnig:

         ```sql
WRN: <Date>: contains characters outside ISO-LATIN-1 :  <source file>
     then check if the source file language is part of the [supported languages with Unicode](http://doc.castsoftware.com/display/DOC83/Supported+Character+Sets#SupportedCharacterSets-SupportedLanguageswithUnicode):

     1. If not supported then it is expected to not show the source code of the object
     2. Else if it is supported then contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/requests/new). with the following [Relevant input](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-engineering-dashboard-component-ced/cast-engineering-dashboard-source-code/):
  2. Else if you find the folliwing information

     ```sql

INF: : Task message: Source Update skipped for “name of the local schema”


         then search for the following information in Cast-MS log file:

         ```sql
INF: <Date>: 	Section.run Modify Always upload source code for viewing in CAST Dashboard
                          Modify Always upload source code for viewing in CAST Dashboard (Duration: time ms)
     1. If you find the above message, then the user have unchecked the option "**Always upload Source Code for viewing in CAST Dashboard**" from Cast-MS. for more information refer to [CMS - Common Technology options](https://doc-legacy.castsoftware.com/display/DOC83/CMS+-+Common+Technology+options)
     2. Else contact [CAST Technical Support](https://help.castsoftware.com/hc/en-us/requests/new). with the following [Relevant input](/export-v2/tg/technical-guides/technical-guides-by-cast-aip-component/cast-engineering-dashboard-component-ced/cast-engineering-dashboard-source-code/):
  1. If the above steps do not solve your issue contact CAST Technical Support. with the following Relevant input:.Support will try to reproduce the issue by following the page CAST Engineering Dashboard - Information - Source code - Missing Sources - How to reproduce user issues

Notes / Comments

Ticket # 5085 #6578 #9917