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"
Release | Yes/No |
---|---|
8.3.x |
RDBMS | Yes/No |
---|---|
CSS |
Step by Step scenario
- Compute snapshot
- Launch CED
- Go to Investigation - Quality Model Drill down view
- Select a violated object
- Observe the source code of the violated object
Action Plan
Check if it is expected to get the message error, for this navigate to the description of the Quality Rule:
If the Quality rule is part of the AIP Corp then refer to QRL - Metrics and Quality Rules listed in alphabetical order,
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)
- 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.
Check if the object source code has been uploaded:
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
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:
-- 109
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 = <id of the source file path>
Result sample:
--"C:\CASTMS\Deploy\delta_test\My Package\StrutsHelloWorld\resources\ApplicationResources.properties"
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 = <path>
Result sample:
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
If the source code of the object has been uploaded then:
Check the consistency of the tables dss_translation_table, dss_sites andviewer_sites then remediate if at least one of the tables is not consistent:
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:
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
viewer_site table should return one row per doublet (central schema&local schema), to check this run the following on the central schema:
SELECT * FROM viewer_sites;
Result sample:
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.
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:
SELECT DISTINCT site_id FROM dss_translation_table
Result sample:
--526478342; --526478343;
If the query return more than 1 row, then the table is not consistent
If at least one of the tables is not consistent then perform the following:
- Take a backup of the triplet
Delete the older site_ids from the dss_sites table on the central:
DELETE FROM dss_sites WHERE site_type=2 AND site_id NOT IN (SELECT MAX(site_id) FROM dss_sites WHERE site_type=2 );
Delete the older site_ids from the viewer_sites table on the central:
DELETE FROM viewer_sites WHERE id NOT IN (SELECT MAX(site_id) FROM dss_sites WHERE site_type=2 );
Update the dss_translation table for the newest site_id on the central:
UPDATE dss_translation_table SET site_id= (SELECT MAX(site_id) FROM dss_sites WHERE site_type=2 );
- Synchronize the local and central schema, for more information refer to CMS - Synchronize
- Upload the source to the local schema, for more information refer to CMS - Upload Source Code
- If the issue is not solved with the above steps then contact CAST Technical Support. with the following Relevant input:
Else If the source code of the object has not been uploaded then:
Open Cast-Ms log file, for more information about the location of the logs refer to CAST Management Studio - Information - How to find logs
Identify the Update sources task, for this refer to CMS Snapshot Analysis - Update Sources - Error Free Logs - CAST AIP 83
Search for all the occurrence of the source file of the object under Update sources task
If you find the following information:
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
Else if you find the following information
INF: <Date>: cannot open : <source file>
then the source file of the object was not opened, for more investigation refer to CMS Snapshot Analysis - Update Sources
Else if you find the following warnnig:
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:
If not supported then it is expected to not show the source code of the object
- Else if it is supported then contact CAST Technical Support. with the following Relevant input:
Else if you find the folliwing information
INF: <Date>: Task message: Source Update skipped for "name of the local schema"
then search for the following information in Cast-MS log file:
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)
- 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
- Else contact CAST Technical Support. with the following Relevant input:
- 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
Ticket # 5085 #6578 #9917