Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

AEMaaCS forms Output Services generatePDFOutput throws exception AEM_OUT_001_003

Avatar

Level 6

Tried to generate a PDF with the input of xml and .xdp template. Getting this exception 
com.adobe.fd.output.commons.exception.OutputServiceException: AEM_OUT_001_003:Unexpected Exception: AEM_OUT_001_003:Unexpected Exception: Error resolving template

we are using the below xml and xdp template

<?xml version="1.0" encoding="UTF-8"?>
<data>
<fName>First Name</fName>
<lName>Last Name</lName>
</data>

aravindS_0-1743163500211.png

Note: we followed the process as per this docx. Generate PDF documents using output service | Adobe Experience Manager

Thanks in advance.

17 Replies

Avatar

Employee

Hi @aravindS,

The XML that you are using is wrong as it is not able to recognize the template. I have updated the input XML and now I am able to see the prefil information.

Pranay_M_0-1743342938259.png

Sample XML:

<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2022-06-21T07:32:11Z" uuid="55226f44-34ad-4572-9ad5-23834f260aa5">
<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
<xfa:data>
<form1>
<fname>FirstName</fname>
<lname>LastName</lname>
</form1>
</xfa:data>
</xfa:datasets>
</xdp:xdp>

Thanks
Pranay

Avatar

Level 6

Hi @Pranay_M ,

Thanks for your reply, I have tried the same xml format which you shared still i got the same exception. This is the code which i'm using. Here I have added the sample xdp also.

aravindS_0-1743491842646.png

Let me if i need to modify/change anything.

Thanks.

Avatar

Employee

Hi @aravindS,

Thank you so much for your response. Based on the description, I have made some changes to the Sample.XML. Please find below the updated XML and try out the options.

 

<?xml version="1.0" encoding="UTF-8"?>
<form1>
<fName>FirstName</fName>
<lName>LastName</lName>
</form1>

 

Also, I tried to run the same sample XDP and the XML using the OOTB example and I am successfully able to generate the output document.

 

Thanks

Pranay

Avatar

Level 6

Hi @Pranay_M ,

I tried again with the xml data, still getting the same exception, can you please share the java code/file, i will try with that.

Thanks

Avatar

Employee

Avatar

Employee Advisor

The link provided by pranay will only work for AEM Forms 6.5 and will not work for AEM Forms CS

Avatar

Level 6

Thanks for your reply @workflowuser  , do you have any reference to run for AEMaaCS.

Avatar

Level 6

Hi @Pranay_M ,

I did a local setup with 6.5.22 , forms also same.
getting the error there also

aravindS_0-1743778653105.png

 

Avatar

Employee

@aravindS  the issue is it is not able to find the template. Can you please make changes to your code as per below code sample?

 

String templateName = "sampleTemplateUpdated.xdp";

PDFOutputOptions pdfOutputOptions = new PDFOutputOptions();
// set content root of tempalte
pdfOutputOptions.setContentRoot("/content/dam/formsanddocuments");

// set other options in PDFOutputOptions

// involve Output Service
Document resultantDocument = outputService.generatePDFOutput(templateName,submittedData, pdfOutputOptions);

 

OutputService java docs for Cloud are at https://javadoc.io/doc/com.adobe.aem/aem-forms-sdk-api/latest/com/adobe/fd/output/api/OutputService.... and PDFOutputOptions can be found at https://javadoc.io/doc/com.adobe.aem/aem-forms-sdk-api/latest/com/adobe/fd/output/api/PDFOutputOptio....

 

Thanks,

Darshan

Avatar

Level 6

Hi @DarshanMahor ,

Thanks for your reply, i tried the above code as well, didn't worked as expected.

Avatar

Employee Advisor

If your bundles are not in active state your install has not succeeded 

ppease make sure all bundles are active 

Avatar

Moderator

@aravindS , I just wanted to check in—has the issue been resolved, or are you still in the process of gathering information?

Avatar

Level 6

Hi @Khushwant_Singh ,

I'm checking on this, if works i will update

Avatar

Moderator

Please let us know, @aravindS. Thanks! 

Avatar

Level 1

@aravindS any update on the issue. Please let us know if you find any solution for this issue.

 

Avatar

Level 1

We are also facing the same issue. I have gone through the above steps, but still issues exists 

Avatar

Level 6