Getting 500 when adding rules in Adaptive forms(Only in one of the Environment) in publisher | Community
Skip to main content
kamalakannank62
Level 3
June 1, 2021
Question

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

  • June 1, 2021
  • 3 replies
  • 1874 views

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 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Pulkit_Jain_
Adobe Employee
Adobe Employee
June 1, 2021

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

kamalakannank62
Level 3
June 1, 2021

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.

Pulkit_Jain_
Adobe Employee
Adobe Employee
June 1, 2021

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

kamalakannank62
Level 3
June 1, 2021
Sure I can try this, but this is only happening in our UAT, not in other lower environments.
Mayank_Gandhi
Adobe Employee
Adobe Employee
June 1, 2021

@kamalakannank62 have you published the fdm?