Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Exception while merging data with XDP using FormDataIntegration


Former Community Member
Hi All,

I am trying to merge the XML data into and XDP to create a PDF using FormDataIntegration.

But i got the following error:

com.adobe.livecycle.formdataintegration.client.ImportFormDataException: Operation aborted: malformed PDF or data.

at com.adobe.livecycle.formdataintegration.server.FormData.importData(FormData.java:89)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:181)

at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:134)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(EjbTransactionBMTAdapterBean.java:218)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapter_jmbvky_ELOImpl.doRequiresNew(EjbTransactionBMTAdapter_jmbvky_ELOImpl.java:63

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:133)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:80)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)

at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.invoke(AbstractMessageReceiver.java:298)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invokeCall(SoapSdkEndpoint.java:125)

at com.adobe.idp.dsc.provider.impl.soap.axis.sdk.SoapSdkEndpoint.invoke(SoapSdkEndpoint.java:77)

at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)

at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)

at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)

at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)

at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)

at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)

at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)

at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)

at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)

at javax.servlet.http.HttpServlet.service(HttpServl
13 Replies


Level 10
The FormDataIntegration service DOESN'T merge data with an XDP. You need to use LiveCycle Forms to do that.

FormDataIntegration only merge data with a PDF.



Former Community Member
failed to invoke FormDataIntegration.importData

Hi Jasmin,

But when I tried to give PDF as input..I got a exception that it allows only xdp..

Hence,I changed the input to an xdp.The XDP has just two text fields,FirstName and LastName.

My functinality is simple.I want a form in the repository to be merged with the xml data and save the pdf on server.How do I customize the RenderForm for the same.

I am not using workspace.I have to invoke this service using a webservice call where the SOAP request will have the data.I have to retrieve the SOAP request data and merge it with the xdp and save it on the server's hard disk.Response should contain PDF location.Please explain me the various processes to be involved for achieving this requirement including the XPath expressions as I am new to all these technologies.

I tried using the RenderPDFForm of Forms services.Following are the properties I have used.

formUri :Sample.xdp

Target Uri:repository:///Soln.Integration/ Sample.pdf

Context Root Uri :repository:///Soln.Integration/ ,where "Soln.Integration" is a folder in the repository where the Sample.xdp is present.

But got an exception :'Cannot load template from the path'..Is this the right way to give the Uri paths.Also,how do I configure the output so that the pdf is saved on hard disk.


Saritha Reddy


Level 10
The error you get (com.adobe.livecycle.formdataintegration.client.ImportFormDataException: Operation aborted: malformed PDF or data.) is because it wants a PDF and your providing an XDP.

I don't beleive FormDataIntegration will error with an exception that it only allows XDP. It doesn't make sense.

Anyways, LC Forms is what you want to use for creating that PDF from an XDP.

Your settings look fine. By Form URI you mean Form to Render right?

You only really need to set the Form to Render and the Content Root URI. The concatenation of the two (Form To Render + Content Root URI) should result in repository:///Soln.Integration/Sample.pdf.

Can you try to use a folder without a "." to see if it causes a problem?

Can you past the exact error your getting with the path?

The output will be saved in a document variable and you can use the Write Document operation from the File Utilities to write it to the file system.



Former Community Member
Hi Jasmin,

I have moved the files from Soln.Integration to Samples folder.

Still I get the same error

Do i need to use the word 'respository'or the server name we give while configuring..BTW howmany '/' after repository

is it repository:/ or repository:// ??

Following is the exception:

Caused by: com.adobe.livecycle.formsservice.exception.RenderFormException: Failed to load TemplateStream for FormQuery=Sample.xdp from location URI =respository:///Samples/.

at com.adobe.formServer.Template.validate(Template.java:1167)


Level 10
Try to put Content URI: repository://

and Form URL /Samples/Sample.xdp



Former Community Member
Doesn't work :(

.Shall I send you the screen shot of the properties' values..


Level 10

Send me a screen shot of the error, the settings on the renderPDFForm and the repository structure.

Send it to livecycle8@gmail.com.



Former Community Member

I am having same issue with FormDataIntegrationService, when I am using it as a web service trying to merge xml data with a pdf(XFA) form.

It throws an exception "Only XDP data is supported with XFA forms".

on dataIntClient.importData(inPDFForm, inXMLData) call.

When I use XDP template instead of PDF it comes back with malformed exception.


Level 9

Form Data Integration only works with PDF files, as Jasmine has indicated.

The exception you're getting is ACTUALLY telling you that you need to provide the DATA as an XDP file.

(Aside: XDP is a very flexible standard, which allows you to define both XFA forms, or xml data, or both.)

In order to wrap your XML data within the correct XDP "envelope", you can use our component here:


The operation is: insertXdpEnvelope

You can download a trial (free for dev/test) here:





Level 10
You can also just add the XDP envelop using a SetValue operation with an XML variable.



Former Community Member
How do I access the LiveCycle using the webservice.Please help me.



I ran into the same difficulties with the FormDataIntegration. The xml data has to be packaged xdp-conform like this and it worked:

<?xml version="1.0" encoding="UTF-8"?>

<?xfa generator="XFA2_4" APIVersion="2.6.7120.0"?>

          <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">

                    <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">