Hi All,
I am getting below errors in the error.log file.
I am using AEM 6.5 and Output service to create DOR . The script in question is written with language as javascript, and run at client side and event is form ready. The script logic runs fine and the PDF is created with data populated as per the script written.
I have two questions regarding the same.
1. The warning message complains of a null object. I have app.alert all possible values that are calculated and didnt see any null values, how can i debug this further? Any suggestions are welcome.
2. Is there a way to remove these warnings from error.log file? Are there any settings that i can use to only print the errors only in the error.log file and not the warning message.
Snippet from the log file:
14.12.2022 20:07:35.954 *WARN* [RequestProcessor-1] com.adobe.document.XMLFormService ALC-XTG-032-108: [16422] Script failed (language is javascript; context is xfa[0].form[0].xyz[0].PrimaryContact[0].Person[0].Relationship[0])
script=var numOfRelationships = this.instanceManager.count;
var oIndex = 0;
var numOfInstances = Step3.resolveNode("relationships[" + oIndex + "]").householdMember.body.relationshipTo.instanceManager.count;
for(var i = numOfInstances; i < numOfRelationships; i++) {
Step3.resolveNode("relationships[" + oIndex + "]").householdMember.body.relationshipTo.instanceManager.addInstance();
}
var relIndex = this.index;
var oRelationship = Step3.resolveNode("relationships[" + oIndex + "]").householdMember.body.resolveNode("relationshipTo[" + relIndex + "]");
oRelationship.relationshipType.rawValue = RelationShipTypeCode.rawValue;
// find the matching contactID
if (PrimaryContact.Person.ContactId.rawValue === RelatedContactID.rawValue) {
oRelationship.memberName.rawValue = PrimaryContact.Person.NameSF.FirstNameSF.firstName.rawValue + " " + PrimaryContact.Person.NameSF.LastNameSF.lastName.rawValue;
oRelationship.memberIndex.rawValue = 1;
}
var numPersons = this.resolveNode("Person").instanceManager.count;
for (i = 0; i < numPersons; i++) {
var oPerson = this.parent.parent.parent.Step2Person2.resolveNode("Person[" + i + "]");
if(oPerson.HiddenSF.ContactId.rawValue === RelatedContactID.rawValue) {
oRelationship.memberName.rawValue = oPerson.P.Table1.Row1.firstNameSF.firstName.rawValue + " " + oPerson.P.Table1.Row1.lastNameSF.lastName.rawValue ;
}
}
14.12.2022 20:07:35.955 *WARN* [RequestProcessor-1] com.adobe.document.XMLFormService ALC-XTG-032-275: [16422] Error: null is not an object
Regards,
Solved! Go to Solution.
Views
Replies
Total Likes
Here are the steps[0] to enable logging for any class in AEM.
You can set the log level to "INFO" but as mentioned earlier, it's not recommended as this may suppress the actual issue as well.
@UserSD You will see such warnings in the error logs when the form is loaded, and these warnings are usually benign i.e., the field events/calculations result as expected. Let us know if you see any difference in the behavior of the form/fields.
Also, you can suppress these warnings by setting the class "com.adobe.document.XMLFormService" to INFO but it's not recommended as this may camouflage actual issues as well.
Here are the steps[0] to enable logging for any class in AEM.
You can set the log level to "INFO" but as mentioned earlier, it's not recommended as this may suppress the actual issue as well.
Views
Likes
Replies