Expand my Community achievements bar.

SOLVED

Script errors in error.log (ALC-XTG-032-108: [16422] Script failed (language is javascript; context is xfa[0].form[0].abc[0].PrimaryContact[0].Person[0].Relationship[0])

Avatar

Level 2

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,

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

@UserSD 

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.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/troubleshooting/steps-to-enab... 

View solution in original post

3 Replies

Avatar

Employee Advisor

@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.

Avatar

Level 2

Hi @Pulkit_Jain_ , where can i set this option to info in AEM forms osgi 6.5?

 

Regards,

Avatar

Correct answer by
Employee Advisor

@UserSD 

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.

 

[0] - https://experienceleague.adobe.com/docs/experience-manager-learn/forms/troubleshooting/steps-to-enab...