Javascript error in BAExt.js

Document ID : KB000120051
Last Modified Date : 07/11/2018
Show Technical Document Details
Issue:
When enabling a web application to be monitored by CA AXA, no errors are observed by just specifying the BA.js in the snippet
When adding the BAExt.js Javascript errors can be observed in the browser console


BA.js:160 Uncaught TypeError: Cannot read property 'length' of undefined
at Object.createTT (BA.js:160)
at handleResEvt (BA.js:204)
at harvestEvts (BA.js:232)
Environment:
CA AXA 17.3.1
Cause:
Order of script references in the snippet was causing the error.
Resolution:

The script with reference ca_eum_ba_ext should come before ca_eum_ba, as below:

<script type="text/javascript" id="ca_eum_ba_ext" src="http://axahost:7081/api/1/urn:ca:tenantId:mytenant/urn:ca:appId:myapp/extjs?agent=browser"></script>
<script type="text/javascript" id="ca_eum_ba" src="http://axahost:7081/api/1/urn:ca:tenantId:mytenant/urn:ca:appId:myapp/bajs?agent=browser" data-profileUrl="http://axahost:7081/api/1/urn:ca:tenantId:mytenant/urn:ca:appId:myapp/profile?agent=browser" data-tenantID="mytenant" data-appID="myapp" data-appKey="b0361800-4736-11e6-b8e5-bddc75280658"></script>