Expand my Community achievements bar.

SOLVED

getting error when using formsService.renderPDFForm method in JAVA code

Avatar

Level 4

Hi techies
I am trying to get interactive PDF generated from XDP from particular NAS location.
XDP path is getting resolved and I am getting object returned from PDFFormRenderOptions after passing xciSetting.xci path using crx:/// path which is uploaded to my local AEM instance.
But i am passing xciSetting Object along with XDP path to
PDFFormRenderOptions ro = getRenderOptions(pathToXCIFile, pathToXDP);
Document returnDoc = formsService.renderPDFForm(xdp, null, ro);

I am unable to get PDF generated and getting below error

07.08.2020 16:20:51.731 *ERROR* [RequestProcessor-1] com.adobe.document.XMLFormService ALC-XTG-032-207: [3532] XMLForm, render : 29391, Destination not specified.
07.08.2020 16:20:51.739 *ERROR* [0:0:0:0:0:0:0:1 [1596797446295] POST /bin/generate-pdf HTTP/1.1] com.adobe.forms.aem.impl.XFANativeServiceImpl <?xml version="1.0" encoding="UTF-8"?>
<status
><messages
><m mid="29391" tid="3532.7176" sev="f" d="2020-08-07T16:20:51.730+05:30"
>XMLForm, render : 29391, Destination not specified.</m
></messages
><validationWarnings
/><validationErrors
/></status
>
07.08.2020 16:20:51.740 *ERROR* [0:0:0:0:0:0:0:1 [1596797446295] POST /bin/generate-pdf HTTP/1.1] com.adobe.forms.aem.impl.XFANativeServiceImpl Exception:
java.lang.Exception: PAExecute Failure: XFA_RENDER_FAILURE
at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:162)
at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:430)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2$$anonfun$2.apply(XMLFormServiceImpl.scala:167)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2$$anonfun$2.apply(XMLFormServiceImpl.scala:167)
at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2.apply(XMLFormServiceImpl.scala:166)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$paExecute$2.apply(XMLFormServiceImpl.scala:158)
at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl.paExecute(XMLFormServiceImpl.scala:156)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$renderDoc$2.apply(XMLFormServiceImpl.scala:284)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl$$anonfun$renderDoc$2.apply(XMLFormServiceImpl.scala:283)
at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)
at com.adobe.forms.xtg.impl.XMLFormServiceImpl.renderDoc(XMLFormServiceImpl.scala:283)
at com.adobe.forms.service.impl.RenderPdfServiceImpl$$anonfun$com$adobe$forms$service$impl$RenderPdfServiceImpl$$renderPdf$2.apply(RenderPdfServiceImpl.scala:81)
at com.adobe.forms.service.impl.RenderPdfServiceImpl$$anonfun$com$adobe$forms$service$impl$RenderPdfServiceImpl$$renderPdf$2.apply(RenderPdfServiceImpl.scala:68)
at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)
at com.adobe.forms.service.impl.RenderPdfServiceImpl.com$adobe$forms$service$impl$RenderPdfServiceImpl$$renderPdf(RenderPdfServiceImpl.scala:68)
at com.adobe.forms.service.impl.RenderPdfServiceImpl.render(RenderPdfServiceImpl.scala:135)
at com.adobe.forms.service.impl.LCFormsOsgiServiceImpl$$anonfun$2.apply(LCFormsOsgiServiceImpl.scala:86)
at com.adobe.forms.service.impl.LCFormsOsgiServiceImpl$$anonfun$2.apply(LCFormsOsgiServiceImpl.scala:81)
at com.adobe.forms.logging.PerfLogger$class.measure(PerfLogger.scala:60)
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33)
at com.adobe.forms.service.impl.LCFormsOsgiServiceImpl.render(LCFormsOsgiServiceImpl.scala:81)
at com.adobe.fd.forms.internal.RenderPDFFormService.renderPDFForm(RenderPDFFormService.java:52)
at com.adobe.fd.forms.impl.FormsServiceImpl.renderPDFForm(FormsServiceImpl.java:95)
at prefillpdfgenerator.core.mergers.DataMerger.createDynamicPDF(DataMerger.java:47)
at prefillpdfgenerator.core.servlets.DataMergerServlet.doPost(DataMergerServlet.java:204)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:345)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:376)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:546)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:151)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:362)
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:177)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
at com.adobe.cq.social.ugcbase.security.impl.SaferSlingPostServlet.doFilter(SaferSlingPostServlet.java:126)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.dam.core.impl.assetlinkshare.AdhocAssetShareAuthHandler.doFilter(AdhocAssetShareAuthHandler.java:381)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.dam.core.impl.servlet.ActivityRecordHandler.doFilter(ActivityRecordHandler.java:155)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:73)
at com.adobe.granite.requests.logging.impl.RequestLoggerImpl.doFilter(RequestLoggerImpl.java:114)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.csrf.impl.CSRFFilter.doFilter(CSRFFilter.java:220)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.security.impl.ContentDispositionFilter.doFilter(ContentDispositionFilter.java:181)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.AuthoringUIModeServiceImpl.doFilter(AuthoringUIModeServiceImpl.java:367)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:248)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at prefillpdfgenerator.core.filters.LoggingFilter.doFilter(LoggingFilter.java:56)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.aem.core.filters.LoggingFilter.doFilter(LoggingFilter.java:56)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.livecycle.content.appcontext.impl.AppContextFilter.doFilter(AppContextFilter.java:69)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:95)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.analytics.provisioning.impl.UserAuthenticationRequestFilter.doFilter(UserAuthenticationRequestFilter.java:119)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.livecycle.dsc.clientsdk.internal.ResourceResolverHolderFilter.doFilter(ResourceResolverHolderFilter.java:37)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:285)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:74)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.fd.core.security.internal.CurrentUserServiceImpl.doFilter(CurrentUserServiceImpl.java:114)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:107)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.cq.mcm.campaign.servlets.CampaignCopyTracker.doFilter(CampaignCopyTracker.java:100)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:77)
at com.adobe.granite.httpcache.impl.InnerCacheFilter.doFilter(InnerCacheFilter.java:56)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.rest.impl.servlet.ApiResourceFilter.doFilter(ApiResourceFilter.java:67)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServletStarterFilter.java:169)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:84)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151)
at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:216)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:85)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:79)
at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:89)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:290)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:129)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75)
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135)
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:74)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:124)
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:61)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:587)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:221)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
07.08.2020 16:20:51.782 *ERROR* [0:0:0:0:0:0:0:1 [1596797446295] POST /bin/generate-pdf HTTP/1.1] com.adobe.fd.forms.internal.exception.FormsServiceException AEM_FRM_001_004:Unexpected Exception: null
com.adobe.forms.service.LCFormsServiceException: null
at com.adobe.forms.service.impl.LCFormsOsgiServiceImpl.render(LCFormsOsgiServiceImpl.scala:92)
at com.adobe.fd.forms.internal.RenderPDFFormService.renderPDFForm(RenderPDFFormService.java:52)
at com.adobe.fd.forms.impl.FormsServiceImpl.renderPDFForm(FormsServiceImpl.java:95)
at prefillpdfgenerator.core.mergers.DataMerger.createDynamicPDF(DataMerger.java:47)
at prefillpdfgenerator.core.servlets.DataMergerServlet.doPost(DataMergerServlet.java:204)
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:149)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:345)
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:376)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:546)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Just to confirm: you are using the FormsService API on AEM Forms OSGi (6.4?) and you have written some Java code to access the functionality of the renderPDFForm function.

This is the Javadoc:

kprokopi_1-1596803167782.png

Assuming you have correctly set up the paths and your getRenderOptions properly identifies the files and sets the Document variables and sets all fields of your option correctly:

is the xdp variable pointing to a valid URL which returns the XDP?

Why is the second parameter null? This should be a Document variable with the data?

 

Have you tried to make some simple example with local resources and got this to work?

View solution in original post

4 Replies

Avatar

Correct answer by
Employee

Just to confirm: you are using the FormsService API on AEM Forms OSGi (6.4?) and you have written some Java code to access the functionality of the renderPDFForm function.

This is the Javadoc:

kprokopi_1-1596803167782.png

Assuming you have correctly set up the paths and your getRenderOptions properly identifies the files and sets the Document variables and sets all fields of your option correctly:

is the xdp variable pointing to a valid URL which returns the XDP?

Why is the second parameter null? This should be a Document variable with the data?

 

Have you tried to make some simple example with local resources and got this to work?

Avatar

Level 1

Hi Kosta, 

 

  As per you solution I am still facing same error to render/generate PDF from XDP + XML data. 

 

I refered the same URL as mentioned by Adobe https://experienceleague.adobe.com/docs/experience-manager-learn/forms/document-services/generate-in...

 

I just did some minor changes in given example which I am sharing below.

package com.adobe.sample.core.servlets;

import com.adobe.aemds.guide.addon.dor.DoRService;
import com.adobe.aemfd.docmanager.Document;
import com.adobe.fd.forms.api.AcrobatVersion;
import com.adobe.fd.forms.api.FormsService;
import com.adobe.fd.forms.api.FormsServiceException;
import com.adobe.fd.forms.api.PDFFormRenderOptions;
import com.adobe.fd.output.api.OutputService;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.apache.sling.api.servlets.SlingAllMethodsServlet;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.w3c.dom.Node;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;

import javax.servlet.Servlet;
import javax.servlet.ServletOutputStream;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
import java.io.*;


@component(service = {
Servlet.class
}, property = {
"sling.servlet.methods=post",
"sling.servlet.paths=/bin/customdor"
})

public class GenerateIInteractiveDor extends SlingAllMethodsServlet {

@reference
OutputService outputService;

@reference
FormsService formsService;

@reference
ResourceResolverFactory resolverFactory;

@reference
DoRService doRService;

private static final Logger log = LoggerFactory.getLogger(GenerateIInteractiveDor.class);

protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) {
doPost(request, response);
}

 

protected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) {


String xdpName = "f8918-r14e_redo-barcode.xdp";
XPathFactory xfact = XPathFactory.newInstance();
XPath xpath = xfact.newXPath();
String dataXml = request.getParameter("dataXml");
System.out.println("The data xml is " + dataXml);
org.w3c.dom.Document xmlDataDoc = this.w3cDocumentFromStrng(dataXml);
System.out.println("The af bound data is " + xmlDataDoc.getElementsByTagName("topmostSubform").getLength());

try {
Node res = (Node)xpath.evaluate("afData/afBoundData/topmostSubform", xmlDataDoc, XPathConstants.NODE);
StringWriter writer = new StringWriter();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(res), new StreamResult(writer));
String xml = writer.toString();
System.out.println(xml);
xmlDataDoc = this.w3cDocumentFromStrng(xml);
com.adobe.aemfd.docmanager.Document xmlDataDocument = this.orgw3cDocumentToAEMFDDocument(xmlDataDoc);
String xdpTemplatePath = "crx:///content/dam/formsanddocuments/demo";
PDFFormRenderOptions renderOptions = new PDFFormRenderOptions();
renderOptions.setAcrobatVersion(AcrobatVersion.Acrobat_11);
renderOptions.setContentRoot(xdpTemplatePath);
// renderOptions.setRenderAtClient(RenderAtClient.NO);
com.adobe.aemfd.docmanager.Document xdpPDF = this.formsService.renderPDFForm(xdpName, xmlDataDocument, renderOptions);
InputStream fileInputStream = xdpPDF.getInputStream();
System.out.println("Got xdp PDF" + fileInputStream.available());
response.setContentType("application/pdf");
response.addHeader("Content-Disposition", "attachment; filename=" + xdpName.replace("xdp", "pdf"));
response.setContentLength(fileInputStream.available());
ServletOutputStream responseOutputStream = response.getOutputStream();

int bytes;
while((bytes = fileInputStream.read()) != -1) {
responseOutputStream.write(bytes);
}

responseOutputStream.flush();
responseOutputStream.close();
} catch (XPathExpressionException var19) {
log.debug(var19.getMessage());
} catch (TransformerException var20) {
log.debug(var20.getMessage());
} catch (FormsServiceException var21) {
log.debug(var21.getMessage());
} catch (IOException var22) {
log.debug(var22.getMessage());
}

/* String xdpName = "f8918-r14e_redo-barcode_3 2.xdp";
ResourceResolver serviceResolver = null;
try {
Map<String, Object> param = new HashMap<String, Object>();
param.put(ResourceResolverFactory.SUBSERVICE, "cox-nodecreate-user");
serviceResolver = resolverFactory.getServiceResourceResolver(param);
} catch (LoginException e) {
e.printStackTrace();
}

String dataXml = request.getParameter("dataXml");

String formPath ="/content/forms/af/f8918complete";
DoROptions doROptions = new DoROptions();
doROptions.setData(dataXml);
doROptions.setFormResource(serviceResolver.getResource(formPath));

Locale en = new Locale("en");
doROptions.setLocale(en);

try {
DoRResult render = doRService.render(doROptions);
byte[] content = render.getContent();
Document document = new Document(content);

byte[] encode = Base64.getEncoder().encode(content);
String s = new String(encode);

Resource genRes = serviceResolver.getResource("/content/usergenerated/content/demo");
javax.jcr.Node node = genRes.adaptTo(javax.jcr.Node.class);
javax.jcr.Node node1 = node.addNode("sumo.pdf", "nt:file");
javax.jcr.Node node2 = node1.addNode("jcr:content", "nt:resource");
Binary binary = serviceResolver.adaptTo(Session.class).getValueFactory().createBinary(document.getInputStream());
node2.setProperty("jcr:data",binary);

} catch (DoRGenerationException e) {
e.printStackTrace();
} catch (LockException e) {
e.printStackTrace();
} catch (ItemExistsException e) {
e.printStackTrace();
} catch (ConstraintViolationException e) {
e.printStackTrace();
} catch (PathNotFoundException e) {
e.printStackTrace();
} catch (NoSuchNodeTypeException e) {
e.printStackTrace();
} catch (VersionException e) {
e.printStackTrace();
} catch (RepositoryException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}*/


/* XPathFactory xfact = XPathFactory.newInstance();
XPath xpath = xfact.newXPath();
//String dataXml = request.getParameter("formData");
System.out.println("The data xml is " + dataXml);
org.w3c.dom.Document xmlDataDoc = this.w3cDocumentFromStrng(dataXml);
Document xmlDataDocument = this.orgw3cDocumentToAEMFDDocument(xmlDataDoc);
// ResourceResolver serviceResolver = this.getResolver.getFormsServiceResolver();
Resource resource = serviceResolver.getResource("/content/dam/formsanddocuments/Demo/f8918-r14e_redo-barcode.xdp/jcr:content/renditions/original/jcr:content");
javax.jcr.Node xdpTemplateNode = resource.adaptTo(javax.jcr.Node.class);
log.debug("Got the xdp node ");
PDFOutputOptions pdfOptions = new PDFOutputOptions();
pdfOptions.setAcrobatVersion(com.adobe.fd.output.api.AcrobatVersion.Acrobat_11);
Document xdpTemplate = null;

try {
InputStream is = xdpTemplateNode.getProperty("jcr:data").getBinary().getStream();
log.debug("The size of Input Stream is " + is.available());
xdpTemplate = new Document(is);
log.debug("Created XDP Template");
Document generatedPDF = this.outputService.generatePDFOutput(xdpTemplate, xmlDataDocument, pdfOptions);

} catch (RepositoryException var11) {
log.debug("The error message is " + var11.getMessage());
} catch (OutputServiceException var12) {
log.debug("The error message is " + var12.getMessage());
} catch (IOException var13) {
log.debug("The error message is " + var13.getMessage());
}*/

 

/* System.out.println("The af bound data is " + xmlDataDoc.getElementsByTagName("topmostSubform").getLength());
try {
// get the actual xml data that needs to be merged with the template. This can be made more generic
Node res = (Node) xpath.evaluate("afData/afBoundData/topmostSubform", xmlDataDoc, XPathConstants.NODE);
StringWriter writer = new StringWriter();
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(new DOMSource(res), new StreamResult(writer));
String xml = writer.toString();
System.out.println(xml);
xmlDataDoc = this.w3cDocumentFromStrng(xml);
xmlDataDocument = this.orgw3cDocumentToAEMFDDocument(xmlDataDoc);
String xdpTemplatePath = "crx:///content/dam/formsanddocuments";
com.adobe.fd.forms.api.PDFFormRenderOptions renderOptions = new com.adobe.fd.forms.api.PDFFormRenderOptions();
renderOptions.setAcrobatVersion(com.adobe.fd.forms.api.AcrobatVersion.Acrobat_11);
renderOptions.setContentRoot(xdpTemplatePath);
//renderOptions.setRenderAtClient(com.adobe.fd.forms.api.RenderAtClient.NO);
Document xdpPDF = formsService.renderPDFForm(xdpName, xmlDataDocument, renderOptions);
InputStream fileInputStream = xdpPDF.getInputStream();
System.out.println("Got xdp PDF" + fileInputStream.available());
response.setContentType("application/pdf");

response.addHeader("Content-Disposition", "attachment; filename=" + xdpName.replace("xdp", "pdf"));
response.setContentLength((int) fileInputStream.available());
OutputStream responseOutputStream = response.getOutputStream();
int bytes;
while ((bytes = fileInputStream.read()) != -1) {
responseOutputStream.write(bytes);
}
responseOutputStream.flush();
responseOutputStream.close();

} catch (XPathExpressionException e) {
log.debug(e.getMessage());

} catch (TransformerException e) {

log.debug(e.getMessage());
} catch (FormsServiceException e) {

log.debug(e.getMessage());
} catch (IOException e) {

log.debug(e.getMessage());
}*/

}
public static Document orgw3cDocumentToAEMFDDocument(org.w3c.dom.Document xmlDocument) {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
DOMSource source = new DOMSource(xmlDocument);
log.debug("$$$$In orgW3CDocumentToAEMFDDocument method");
StreamResult outputTarget = new StreamResult(outputStream);

try {
TransformerFactory.newInstance().newTransformer().transform(source, outputTarget);
InputStream is1 = new ByteArrayInputStream(outputStream.toByteArray());
Document xmlAEMFDDocument = new Document(is1);
if (log.isDebugEnabled()) {
xmlAEMFDDocument.copyToFile(new File("dataxmldocument.xml"));
}

return xmlAEMFDDocument;
} catch (Exception var7) {
log.debug("Error in generating ddx " + var7.getMessage());
return null;
}
}
public static org.w3c.dom.Document w3cDocumentFromStrng(String xmlString) {
try {
log.debug("Inside w3cDocumentFromString");
DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
InputSource is = new InputSource();
is.setCharacterStream(new StringReader(xmlString));
return db.parse(is);
} catch (ParserConfigurationException var4) {
var4.printStackTrace();
} catch (SAXException var5) {
var5.printStackTrace();
} catch (IOException var6) {
var6.printStackTrace();
}

return null;
}
}


 Error Logs 

30.01.2022 16:43:13.759 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] jacorb.poa Using server ID (4025226157) for transient POA
30.01.2022 16:43:13.766 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.service.ProcessResource Service XMLFormService: Starting native process with command line "aem_classic\\author-on-8\\crx-quickstart\\bedrock\\svcnative\\XMLFormService\\bin\\XMLForm.exe" -MyPath aem_classic\author-on-8\crx-quickstart\bedrock\svcnative\XMLFormService -IOR IOR:000000000000002249444C3A636F6D2F61646F62652F736572766963652F4D616E616765723A312E3000000000000001000000000000007400010200000000103139322E3136382E3235332E31323800D714000000000018343032353232363135372F42522D362F0100000000000000000000020000000000000008000000004A41430000000001000000200000000000010001000000010501000100010109000000020501000100010100 -AppServer Adobe-OSGi
30.01.2022 16:43:13.770 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.service.ResourcePooler Failure while process launch, attempt: 4
30.01.2022 16:43:13.812 *WARN* [ProcessResource@73c88b1b(name=XMLForm.exe,pid=0) Error Reader] com.adobe.service.ProcessResource Service XMLFormService: Process ProcessResource@73c88b1b(name=XMLForm.exe,pid=0) terminated abnormally with error code -1073741701
30.01.2022 16:43:13.814 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.service.ResourcePooler Failure while process launch, attempt: 5
30.01.2022 16:43:13.814 *INFO* [POADestructor] jacorb.poa POA BR-6 destroyed
30.01.2022 16:43:13.815 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] jacorb.poa Using server ID (4025226157) for transient POA
30.01.2022 16:43:13.822 *INFO* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.service.ProcessResource Service XMLFormService: Starting native process with command line "\\aem_classic\\author-on-8\\crx-quickstart\\bedrock\\svcnative\\XMLFormService\\bin\\XMLForm.exe" -MyPath \aem_classic\author-on-8\crx-quickstart\bedrock\svcnative\XMLFormService -IOR IOR:000000000000002249444C3A636F6D2F61646F62652F736572766963652F4D616E616765723A312E3000000000000001000000000000007400010200000000103139322E3136382E3235332E31323800D714000000000018343032353232363135372F42522D372F0100000000000000000000020000000000000008000000004A41430000000001000000200000000000010001000000010501000100010109000000020501000100010100 -AppServer Adobe-OSGi
30.01.2022 16:43:13.828 *ERROR* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.forms.aem.impl.XFANativeServiceImpl Exception:
java.lang.IllegalStateException: Connection to failed service.
at com.adobe.service.ResourcePooler.allocateResource(ResourcePooler.java:104)
at com.adobe.service.ConnectionFactoryManagerPeer.getConnectionResourceFromPool(ConnectionFactoryManagerPeer.java:76)
at com.adobe.service.ConnectionFactoryManagerPeerImpl.getConnection(ConnectionFactoryManagerPeerImpl.java:155)
at com.adobe.service.impl.PlatformPeerImpl.lookup(PlatformPeerImpl.java:49) [adobe-aemds-core-bmc:3.0.84]
at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:136) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.forms.aem.impl.XFANativeServiceImpl.paExecute(XFANativeServiceImpl.java:481) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.forms.xtg.impl.XMLFormServiceImpl.$anonfun$paExecute$4(XMLFormServiceImpl.scala:177) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger.measure(PerfLogger.scala:60) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger.measure$(PerfLogger.scala:46) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.xtg.impl.XMLFormServiceImpl.$anonfun$paExecute$2(XMLFormServiceImpl.scala:177) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger.measure(PerfLogger.scala:60) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger.measure$(PerfLogger.scala:46) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.logging.PerfLogger$.measure(PerfLogger.scala:33) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.forms.xtg.impl.XMLFormServiceImpl.paExecute(XMLFormServiceImpl.scala:168) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]

at com.adobe.fd.forms.internal.RenderPDFFormService.render(RenderPDFFormService.java:66) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.fd.forms.internal.RenderPDFFormService.renderPDFForm(RenderPDFFormService.java:83) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.fd.forms.impl.FormsServiceImpl.renderPDFForm(FormsServiceImpl.java:121) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.sample.core.servlets.GenerateIInteractiveDor.doPost(GenerateIInteractiveDor.java:110) [sample-aem-31.core:0.0.1.SNAPSHOT]
at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:146) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.22.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.22.0]
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:574) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:88) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:156) [com.day.cq.wcm.cq-wcm-core:5.12.188]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:375) [com.day.cq.wcm.cq-wcm-core:5.12.188]
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:190) [com.day.cq.wcm.cq-wcm-core:5.12.188]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.core.impl.page.PageLockFilter.doFilter(PageLockFilter.java:91) [com.day.cq.wcm.cq-wcm-core:5.12.188]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:94) [com.day.cq.cq-personalization:5.12.44]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:283) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:84) [org.apache.sling.engine:2.7.8]
[org.apache.sling.engine:2.7.8]
at com.adobe.cq.social.commons.cors.CORSAuthenticationFilter.doFilter(CORSAuthenticationFilter.java:91) [com.adobe.cq.social.cq-social-commons:1.10.83]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226) [com.day.cq.wcm.cq-wcm-foundation:5.12.42]
at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:138) [com.day.cq.wcm.cq-wcm-foundation:5.12.42]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.adobe.granite.optout.impl.OptOutFilter.doFilter(OptOutFilter.java:76) [com.adobe.granite.optout:1.0.0]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.foundation.forms.FormsHandlingServletHelper.handleFilter(FormsHandlingServletHelper.java:226) [com.day.cq.wcm.cq-wcm-foundation:5.12.42]
at com.adobe.cq.wcm.core.components.internal.servlets.CoreFormHandlingServlet.doFilter(CoreFormHandlingServlet.java:126) [com.adobe.cq.core.wcm.components.core:2.3.2]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.adobe.fd.core.security.internal.CurrentUserServiceImpl.doFilter(CurrentUserServiceImpl.java:114) [adobe-aemfd-core-security:3.0.84]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:90) [com.day.cq.wcm.cq-wcm-core:5.12.188]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at com.adobe.cq.history.impl.HistoryRequestFilter.doFilter(HistoryRequestFilter.java:122) [com.adobe.cq.cq-history:5.10.6]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
[org.apache.sling.engine:2.7.8]
at com.adobe.granite.resourceresolverhelper.impl.ResourceResolverHelperImpl.doFilter(ResourceResolverHelperImpl.java:83) [com.adobe.granite.resourceresolverhelper:1.0.4]
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) [org.apache.sling.engine:2.7.8]
at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:250) [org.apache.sling.engine:2.7.8]
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:123) [org.apache.felix.http.jetty:4.1.10]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) [org.apache.felix.http.jetty:4.1.10]
at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:308) [com.adobe.granite.license:1.2.10]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) [org.apache.sling.i18n:2.5.14]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
at org.apache.sling.featureflags.impl.FeatureManager.doFilter(FeatureManager.java:116) [org.apache.sling.featureflags:1.2.2]
at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:142) [org.apache.felix.http.jetty:4.1.10]
at org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) [org.apache.felix.http.jetty:4.1.10]
at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75) [org.apache.sling.engine:2.7.8]
at org.apache.felix.http.base.internal.whiteboard.WhiteboardManager$2.doFilter(WhiteboardManager.java:1008) [org.apache.felix.http.jetty:4.1.10]
at
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383) [org.apache.felix.http.jetty:4.1.10]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882) [org.apache.felix.http.jetty:4.1.10]
at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036) [org.apache.felix.http.jetty:4.1.10]
at java.lang.Thread.run(Thread.java:748)
30.01.2022 16:43:13.830 *ERROR* [127.0.0.1 [1643541193677] POST /bin/customdor HTTP/1.1] com.adobe.fd.forms.internal.exception.FormsServiceException AEM_FRM_001_004:Unexpected Exception: null
com.adobe.forms.service.LCFormsServiceException: null
at com.adobe.forms.service.impl.LCFormsOsgiServiceImpl.render(LCFormsOsgiServiceImpl.scala:95) [com.adobe.livecycle.adobe-lc-forms-core:8.0.180]
at com.adobe.fd.forms.internal.RenderPDFFormService.render(RenderPDFFormService.java:66) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.fd.forms.internal.RenderPDFFormService.renderPDFForm(RenderPDFFormService.java:83) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.fd.forms.impl.FormsServiceImpl.renderPDFForm(FormsServiceImpl.java:121) [com.adobe.livecycle.adobe-lc-forms-bedrock-connector:8.0.180]
at com.adobe.sample.core.servlets.GenerateIInteractiveDor.doPost(GenerateIInteractiveDor.java:110) [sample-aem-31.core:0.0.1.SNAPSHOT]

 


I am using AEM 6.5.11 and AEM Forms 6.5.11 as well on windows machine.  I added properties in sling properties as well 

 

 

 

 

Please have a look into this, your provided solution is not working.  I tried to give all information as much as possible, I don't know why it's not working. I am 100% sure it's issue with Adobe OOTB Apis. 

 

 

 

 

 

Avatar

Employee Advisor

@manu-gupta Are you able to get this working? Please follow the suggestion by @Kosta_Prokopiu1