Hi,
I have followed below article to create custom submit action for Adaptive Forms (Core Components)
But just after submit getting error refer below log. Please share what is wrong here
I am using latest aem sdk and form sdk.
Adobe Experience Manager 2025.11.23482.20251120T200914Z-251200
Adobe Experience Manager Forms 2025.10.17.02-251200
Kindly refer the attached screenshot for more details.
17.12.2025 13:19:49.063 *INFO* [8cbf01c3-d5a3-4840-a8d8-c3d6c928d2a3] com.adobe.aemds.guide.service.impl.FormSubmitActionManagerServiceImpl [AF] [Submit] Submit service named "Custom Submit Action" for form /content/forms/af/my-form-folder/contact-form/jcr:content/guideContainer was found: true
17.12.2025 13:19:49.063 *INFO* [8cbf01c3-d5a3-4840-a8d8-c3d6c928d2a3] com.form.mysite.core.service.CustomSubmitService Using custom submit action service, [data] --> {__ "yourName": "Jimmy",__ "email": "jimmy@mail.com"__}
17.12.2025 13:19:49.064 *ERROR* [8cbf01c3-d5a3-4840-a8d8-c3d6c928d2a3] com.adobe.aem.forms.af.rest.internal.servlets.AdaptiveFormSubmitServlet Exception during form submission
java.lang.NullPointerException: null
at com.adobe.aemds.guide.service.impl.FormSubmitActionManagerServiceImpl.submit(FormSubmitActionManagerServiceImpl.java:146) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1308]
at com.adobe.aemds.guide.service.impl.FormSubmitActionManagerServiceImpl.submit(FormSubmitActionManagerServiceImpl.java:168) [com.adobe.aemds.guide.aemds-guide-core-impl:7.0.1308]
at com.adobe.aem.forms.af.rest.internal.servlets.AdaptiveFormSubmitServlet.lambda$doPost$1(AdaptiveFormSubmitServlet.java:279) [com.adobe.aem.com.adobe.aem.forms.af.rest:1.0.156]
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:description="Custom Submit Action"
jcr:primaryType="sling:Folder"
guideComponentType="fd/af/components/guidesubmittype"
guideDataModel="basic,xfa,xsd"
submitService="Custom Submit Action"/>package com.form.mysite.core.service;
import com.adobe.aemds.guide.model.FormSubmitInfo;
import com.adobe.aemds.guide.service.FormSubmitActionService;
import java.util.HashMap;
import java.util.Map;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Component(
service = FormSubmitActionService.class,
immediate = true
)
public class CustomSubmitService implements FormSubmitActionService {
private static final String serviceName = "Custom Submit Action";
private static Logger log = LoggerFactory.getLogger(CustomSubmitService.class);
@Override
public String getServiceName() {
return serviceName;
}
@Override
public Map<String, Object> submit(FormSubmitInfo formSubmitInfo) {
String data = formSubmitInfo.getData();
log.info("Using custom submit action service, [data] --> " + data);
Map<String, Object> result = new HashMap<>();
result.put("status", "OK");
result.put("message", "Form submitted successfully");
return result;
}
}
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
This should have worked. Can you try with the sample we provide and check:
https://github.com/adobe/aem-core-forms-components/blob/master/it/apps/src/main/content/jcr_root/app...
https://github.com/adobe/aem-core-forms-components/blob/master/it/core/src/main/java/com/adobe/cq/fo...
Also check all your bundles and services are up.
This should have worked. Can you try with the sample we provide and check:
https://github.com/adobe/aem-core-forms-components/blob/master/it/apps/src/main/content/jcr_root/app...
https://github.com/adobe/aem-core-forms-components/blob/master/it/core/src/main/java/com/adobe/cq/fo...
Also check all your bundles and services are up.
@rockstar234 could you help confirm if the above solution helped resolve the issue for you.
Views
Likes
Replies