search cancel

Catalog notification emails have no content

book

Article ID: 257061

calendar_today

Updated On:

Products

CA Service Catalog

Issue/Introduction

Hello,

Our CA Service Catalog notification feature is successfully sending emails, but they are always empty/blank.
It used to work, but today our customer complained about the empty messages, for now we're not sure when exactly the issue began.

A few considerations:
1- I've tried sending emails from both web user interface and WS Methods, the behavior is the same.
2- The issue occurs only on production environment, no matter which server (we have 2). On QLD environment notifications works fine with the same SendGrid configuration.
3- Whenever i try to send an email, the following messages appears on view.log "2022/12/12 17.03.35.766 ERROR [http-nio-8080-exec-13] [DomProcessor] Error Generating Document
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet"

Steps to reproduce:

1- Send an email through "sendRequestEmail" WebService Method (WS_Call.TXT) OR send an email through the "Email" button of the "Request Details" web form

Expected result:
An email is received with the desired data, html and css included when the emails is originated from the WS call. (Example_Email_Good.msg)

Result we've got:
An email is received without any CA Catalog data on the body message. Only the Subject is fulfilled. (Example_Email_Bad.msg)

Environment

Release : 17.3

Cause

In your log files I see these lines repeated many times:

INFO   | jvm 1    | 2022/12/04 18:04:30 | [Fatal Error] requestemailprofile.xsl:507:19: The element type "xsl:otherwise" must be terminated by the matching end-tag "</xsl:otherwise>".
INFO   | jvm 1    | 2022/12/04 18:04:30 | ERROR:  'The element type "xsl:otherwise" must be terminated by the matching end-tag "</xsl:otherwise>".'
INFO   | jvm 1    | 2022/12/04 18:04:30 | FATAL ERROR:  'Could not compile stylesheet'

It appears that a stylesheet has been altered on the system where you are seeing this problem.  

The good news is the error message tells us where to look for our problem:

requestemailprofile.xsl:507:19 => File requestemailprofile.xsl, line 507, character position 19

The problem can be found by comparing the version of the requestemailprofile.xsl in the "view" folder with the version of the same file in the  "custom" folder.

Lines 505-507 in the "view" version look like this:

               <a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                </a>*

The same lines in the "custom" version look like this:

               <!--<a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">-->
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                </a>*

The the <a> tag in line 505 had been commented out, but that tag does not close until line 507 with the </a> tag.  The closing </a> tag must also be commented out.

Resolution

In the "custom" version of the requestemailprofile.xsl file change to this instead, so that the closing </a> tag is also commented out:

               <!--<a href="{concat(/xmlRoot/icsysteminstall/icprotocol,'://',/xmlRoot/icsysteminstall/ichostname,':',/xmlRoot/icsysteminstall/icportno,'/',/xmlRoot/iccontextname,'/', /xmlRoot/icservletname,'?Node=icguinode.requestprofile&amp;Args=',/xmlRoot/COLLECTION/usm_request/request_id/LITERAL)}" title="{$xslcontent3/view_request_details}" alt="{$xslcontent3/view_request_details}">-->
                <xsl:value-of select="/xmlRoot/COLLECTION/usm_request/name/LITERAL"/>
                <!--</a>-->*