Expand my Community achievements bar.

Getting 500 when adding rules in Adaptive forms(Only in one of the Environment) in publisher

Avatar

Level 3

Hey folks,

I am facing an issue in one of the environment, my AAF form is throwing 500 in publish instance when I add rules to the field and publish it. 

 

here is the logs 

com.adobe.aemds.guide.service.impl.JsonObjectCreatorImpl Could not emit JSON with context
java.lang.NullPointerException: null
at com.adobe.aem.dermis.core.service.slingmodel.FormDataModelManager.getAllRules(FormDataModelManager.java:1035) [aem-dermis-core:3.0.128]
at com.adobe.aem.dermis.core.service.slingmodel.FormDataModelManager.getRules(FormDataModelManager.java:1063) [aem-dermis-core:3.0.128]
at com.adobe.aemds.guide.addon.service.impl.FormDataModelServiceImpl.getFDMEntityRule(FormDataModelServiceImpl.java:161) [com.adobe.aemds.guide.aemds-guide-addon-impl:6.0.198]
at com.adobe.aemds.guide.internal.impl.utils.RulesCompiler.mergeFDMRulesWithAFRules(RulesCompiler.java:107) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.198]
at com.adobe.aemds.guide.service.impl.JsonObjectCreatorImpl.create(JsonObjectCreatorImpl.java:581) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.198]
at 

7 Replies

Avatar

Employee Advisor

@kamalakannank62  

As per the logs shared, seems that you're using dataIntegrationUtils API to prefill this field (?). Could you please elaborate on the use case? 

 

com.adobe.aemds.guide.service.impl.JsonObjectCreatorImpl Could not emit JSON with context
java.lang.NullPointerException: null

....
at com.adobe.aemds.guide.internal.impl.utils.RulesCompiler.mergeFDMRulesWithAFRules(RulesCompiler.java:107) [com.adobe.aemds.guide.aemds-guide-core-impl:6.0.198]

 

Please be informed that for adaptive forms using FDM schema, you need to use the prefill JSON compliant with the FDM schema. More details here.

Avatar

Level 3

Hey Jain,

Thats right, I am using FDM and mapped the fields with the data model(swagger json), but the issue is that when I add the Rule to a field, something like showing a Lastname field when Firstname field is filled in.

Avatar

Employee Advisor

@kamalakannank62 

Please make sure that the JSON schema is correct. I think this is an issue with JSON format so you can validate the swagger in swagger.io for a valid definition there.

 

For a quick test, I just created a data source based on RESTful service (using Petstore swagger- https://petstore.swagger.io/ ) on my in-house latest 6.5 set-up and able to populate FirstName/LastName in Adaptive form using GET /user service. You may quickly test this one at your end.

Avatar

Level 3
Sure I can try this, but this is only happening in our UAT, not in other lower environments.

Avatar

Employee Advisor
@kamalakannank62 In that case, i would suggest that you raise a case with support to troubleshoot the issue over a screenshare session.

Avatar

Level 3

Hey Jain,

Still same issue persist, As I said the issue comes with adding the RULES.

Screenshot 2021-06-01 at 14.13.14.png