Support Article
Sax parse error: Content is not allowed in prolog
Summary
Multiple 'Content is not allowed in prolog' exception is generated in the log. This occurs in environment configurations where Internet Explorer with Tomcat or JBoss is used.
Error Messages
sax parse error: Content is not allowed in prolog.
From: (H94B6C73C28A68C67D2320E0381E28A68:)
at com.pega.pegarules.data.internal.clipboard.XMLStream.newStream(XMLStream.java:477)
at com.pega.pegarules.data.internal.clipboard.XMLStream.newStream(XMLStream.java:432)
at com.pega.pegarules.data.internal.clipboard.ClipboardPageImpl.adoptXMLForm(ClipboardPageImpl.java:835)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.mapInputData(HttpAPI.java:2565)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.activityExecutionProlog(EngineAPI.java:554)
Steps to Reproduce
Unknown
Root Cause
A defect or configuration issue in the operating environment.
Resolution
Perform the following local-change:
- Open the Rule UserWorkForm.
- Save As the rule to the application RuleSet (if the rule is not saved already).
- Copy and Paste the below code snippet.
- Save and Check-in.
Code Snippet:
<script>
pega.u.d.attachOnload(function() { pega.u.d.getTrackerChanges = function(event) { /* BUG-184419 : Added check and if it is not window then return else perform change tracking.*/ if (pega.u.d.isAjaxInProgress() || pega.util.Event.getTarget(event) != window) { return; } var strUrlSF = SafeURL_createFromURL(pega.u.d.url); strUrlSF.put("pyActivity", "pzGetTrackerChanges"); /* BUG-211107: HFix-23105, Page Error Messages are not getting displayed on the section. Adding pzKeepPageMessages to avoid the issue*/ strUrlSF.put("pzKeepPageMessages", "true"); pega.u.d.asyncRequest('GET', strUrlSF); }; });
</script>
<script>
pega.u.d.attachOnload(function() {
pega.u.d.harnessOnBeforeUnload = function(event, formToSubmit) {
pega.ui.statetracking.setDocumentBusy();
if (pega.u.d.deletedDocuments) {
pega.ui.statetracking.setDocumentDone();
return;
}
if (pega.u.d.ignoreDirty != "true" && pega.u.NavigateTopHandler && !pega.u.NavigateTopHandler.formSubmit) {
var strDirty = pega.u.d.isFormDirty(true, false, event); /* check for dirty when browser refreshes - exclusive for noIframe DC. kumad1 */
if (strDirty && strDirty != "") {
pega.u.d.gBusyInd.hide();
pega.ui.statetracking.setDocumentDone();
return strDirty;
}
}
if (pega.u.d.skipDeleteDoumentPg) {
delete pega.u.d.skipDeleteDoumentPg;
return;
}
if (pega.u.NavigateTopHandler) {
if (pega.u.d.bModalDialogOpen && pega.u.d.launchFlow) {
/* Check for existence of modal dialog to purge its thread on F5 and browser navigation for noIframe DC. krvbs */
var MODAL_THREAD_NAME = pega.u.d.getThreadName();
MODAL_THREAD_NAME = MODAL_THREAD_NAME.replace("//", "/");
if (!pega.u.d.baseThreadName) {
pega.u.d.baseThreadName = pega.u.d.getThreadName();
}
pega.u.d.switchThread(pega.u.d.baseThreadName);
var safeURL = SafeURL_createFromURL(pega.u.d.url);
safeURL.put("pyActivity", "removeThead");
safeURL.put("threadName", MODAL_THREAD_NAME);
httpRequestAsynch(safeURL.toURL());
}
}
if (pega.desktop.support.getDesktopWindow() && pega.desktop.support.getDesktopWindow().MWReloading == 'true') {
pega.ui.statetracking.setDocumentDone();
return;
}
if (pega.u.NonBlockingAjax)
pega.u.NonBlockingAjax.cleanPendingRequests();
if (pega.u.d.redirectingToLoginScreen) {
pega.ui.statetracking.setDocumentDone();
return;
} else {
try {
var oWnd = pega.desktop.support.getDesktopWindow();
if (!oWnd) {
oWnd = window;
}
if (oWnd.pega.u.d.redirectingToLoginScreen) {
pega.ui.statetracking.setDocumentDone();
return;
}
} catch (e) {}
}
var pagesToRemove = "";
/* BUG-109795 - Added by Delta Touch*/
var parentWindow = pega.desktop.support.getDesktopWindow();
if (parentWindow != null && (parentWindow.logout == true || parentWindow.gLoggedOff == true)) {
pega.ui.statetracking.setDocumentDone();
return;
}
/*BUG-249043: when getDesktopWindow returns null, check for window.logout, for not to send pzdeletedocumentpg request when window.logout is true*/
if (window.logout == true) {
delete window.logout;
pega.ui.statetracking.setDocumentDone();
return;
}
if (!pega.u.d.pyDeleteDocumentPgCompleted) {
/*Add D_UITemplateMeta page to the list of pages to be removed on harness unload*/
pagesToRemove += (pagesToRemove == "") ? "D_UITemplateMeta" : "&" + "D_UITemplateMeta";
/*Remove the top level pages created for grid's filter criteria*/
if (typeof Grids != "undefined" && Grids) {
var gridsMap = Grids.getAllGrids();
for (var i in gridsMap) {
if (gridsMap[i].bFilterable) {
pagesToRemove += (pagesToRemove == "") ? gridsMap[i].gridFilterPage : "&" + gridsMap[i].gridFilterPage;
}
/* get SummaryReport pages bound to a tree grid */
if (gridsMap[i].bTreegrid && gridsMap[i].RDContPage) {
/* the page to which tree grid is bound */
var summaryPages = gridsMap[i].RDContPage;
/* the page populated by executing summary report in RUF UIEngine • populateSummaryView */
summaryPages += "&pgRepPg" + summaryPages.substring(6);
pagesToRemove += (pagesToRemove == "") ? summaryPages : "&" + summaryPages;
}
}
}
if (typeof Charts != 'undefined') {
/*delete cahrt pages*/
var chartsMap = Charts.getAllCharts();
var chartPageToRemove = '';
for (var i in chartsMap) {
var obj = $(chartsMap[i]);
chartPageToRemove = 'D_pzRuntimeChart[ChartID:"' + obj.attr('id') + '"]';
pagesToRemove += (pagesToRemove == "") ? chartPageToRemove : "&" + chartPageToRemove;
$(chartsMap[i]).chart('destroy');
}
}
/*get and append list of to be removed pages added by components*/
var utility = pega.u.template && pega.u.template.utility;
if (utility) {
for (var key in utility.pagesToRemoveMap) {
if (key.indexOf("HID") === 0) {
pagesToRemove += utility.pagesToRemoveMap[key] ? "," + utility.pagesToRemoveMap[key].toString() : "";
utility.pagesToRemoveMap = {};
utility.childsOfASection = {};
break;
}
}
}
/*
var gridNodes = document.querySelectorAll(".layout-grid-wrapper.template-component");
for(var i=0; i<gridNodes.length; i++)
{
var gridNode = gridNodes[i];
if(gridNode && gridNode.id){
gridNodeToRemove = 'D_pzGridMetadata[gridUniqueId:"'+gridNode.id+'"]';
pagesToRemove += (pagesToRemove == "") ? gridNodeToRemove : "&" + gridNodeToRemove;
}
}
*/
if (document.getElementById("PEGAGADGET") || pagesToRemove != "" || bExpressionCalculation) {
var oSafeURL = SafeURL_createFromURL(pega.u.d.url);
delete oSafeURL.hashtable["pzTransactionId"];
if (bExpressionCalculation) {
oSafeURL.put("pyRemCtlExpProp", "true");
}
var hID = document.getElementById("pzHarnessID");
if (hID) {
oSafeURL.put("pzHarnessID", hID.value);
}
/* */
pagesToRemove = pagesToRemove.substring(0, 1500);
/* */
oSafeURL.put("pyPagesToRemove", pagesToRemove);
oSafeURL.put("pyActivity", "pyDeleteDocumentPg");
if (pega.ui.ChangeTrackerMap.getTracker().id) {
oSafeURL.put("AJAXTrackID", pega.ui.ChangeTrackerMap.getTracker().id);
}
var oWnd = pega.desktop.support.getDesktopWindow();
if (!oWnd) {
oWnd = window;
}
var strURL = oSafeURL.toURL();
if (formToSubmit) {
var callbackForFormSubmit = function() {
pega.ui.statetracking.setBusy("formSubmit");
pega.u.d.deletedDocuments = true;
formToSubmit.submit();
pega.u.d.deletedDocuments = false;
pega.u.d.gDirtyOverride = null;
}
oWnd.pega.util.Connect.asyncRequest('GET', strURL, {
success: callbackForFormSubmit
});
} else {
oWnd.pega.util.Connect.asyncRequest('GET', strURL);
}
pega.u.d.pyDeleteDocumentPgCompleted = true;
} else if (formToSubmit) {
pega.ui.statetracking.setBusy("formSubmit");
pega.u.d.deletedDocuments = true;
formToSubmit.submit();
pega.u.d.deletedDocuments = false;
pega.u.d.gDirtyOverride = null;
}
} else if (formToSubmit) {
pega.ui.statetracking.setBusy("formSubmit");
pega.u.d.deletedDocuments = true;
formToSubmit.submit();
pega.u.d.deletedDocuments = false;
pega.u.d.gDirtyOverride = null;
}
if (pega.u.d.isPortal()) {
if (!pega.u.NavigateTopHandler && pega.u.d.getHarnessPurpose() != "pzLiveComposer") {
var oSafeURL = SafeURL_createFromURL(pega.u.d.url);
oSafeURL.put("pyActivity", "pyOnbeforeWindowClose");
var strURL = oSafeURL.toURL();
var oWnd = pega.desktop.support.getDesktopWindow();
if (!oWnd) {
oWnd = window;
}
oWnd.pega.util.Connect.asyncRequest('GET', strURL);
}
}
if (!pega.u.d.dirtyCloseApproved) {
if (pega.u.d.explorerFormIsDirty && pega.u.d.explorerFormIsDirty()) {
if (!event)
event = window.event;
if (event && event.clientY < 0) {
event.returnValue = getLocalString("pyMessageLabel", "Exiting will discard all outstanding changes", null);
}
}
}
pega.ui.statetracking.setDocumentDone();
};
});
</script>
Published March 21, 2019 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.