Custom report fails with "ORA-02019: connection description for remote database not found" after refresh in lower environment

book

Article ID: 198121

calendar_today

Updated On:

Products

Clarity PPM On Premise

Issue/Introduction

After refresh, a custom report based on Storyboard fails with error: 

2020-08-19 12:38:13,718 ERROR AsyncJasperPrintAccessor,pool-6-thread-228:321 [tenant|admin] - Error during report execution

net.sf.jasperreports.engine.JRException: Error executing SQL statement for: CSK_PRJ_ProjectStoryboard.

            at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:347)

Caused by: java.sql.SQLSyntaxErrorException: ORA-02019: connection description for remote database not found

Environment

Release : Any

Component : CA PPM SAAS JASPERSOFT

Resolution

This happens if the database link to PROD DWH has been hardcoded in the main custom report (example):

i.test as TEST from [email protected]

Check the report queries by exporting it or looking in Studio. If this is the case, please contact the report developers and let them know they should use a variable or a parameter or else every time you refresh the environment the reports will break. We do not recommend a hardcoded database links to be included in custom reports.

Once they correct the report script, the report will start running correctly.

This is an example on how they can code it:

<parameter name="LoggedInUserAttribute_dwhDBLink" class="java.lang.String" isForPrompting="false"> <parameterDescription><![CDATA[Data Warehouse DB Link Profile Attribute]]></parameterDescription> </parameter> <parameter name="dwhDBLink" class="java.lang.String" isForPrompting="false"> <parameterDescription><![CDATA[Data Warehouse DB Link to CA PPM DB]]></parameterDescription> <defaultValueExpression><![CDATA[$P{LoggedInUserAttribute_dwhDBLink}]]></defaultValueExpression> </parameter>