Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

problems handling submitted forms


Not applicable
Hi all,

I'm trying to submit a form to my servlet but i have found some errors. My forms is done by LC Forms using XML + XDP and it has two send buttons. One of them is a HTTP button. If I send my form using this button, I received this error:

17:05:27,373 ERROR [STDERR] com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: com.adobe.livecycle.formsservice.exception.FormServerException: Parse error on document: DataSets error: Parse error on document: FSRequest error: Content is not allowed in prolog.

17:05:27,373 ERROR [STDERR] at com.adobe.formServer.FormServer.doProcessFormSubmission(

17:05:27,373 ERROR [STDERR] at com.adobe.formServer.FormServer.processFormSubmission(

17:05:27,373 ERROR [STDERR] at com.adobe.formServer.docservice.FormsDocService.processFormSubmission(

17:05:27,373 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

17:05:27,373 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(

17:05:27,373 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(

17:05:27,373 ERROR [STDERR] at java.lang.reflect.Method.invoke(

17:05:27,373 ERROR [STDERR] at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(

17:05:27,373 ERROR [STDERR] at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(

17:05:27,373 ERROR [STDERR] at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(

17:05:27,373 ERROR [STDERR] at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(

17:05:27,373 ERROR [STDERR] at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterBean.doRequiresNew(

17:05:27,373 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor340.invoke(Unknown Source)

17:05:27,373 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(

17:05:27,373 ERROR [STDERR] at java.lang.reflect.Method.invoke(

17:05:27,373 ERROR [STDERR] at org.jboss.invocation.Invocation.performCall(

17:05:27,373 ERROR [STDERR] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(

17:05:27,373 ERROR [STDERR] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(

17:05:27,373 ERROR [STDERR] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(

17:05:27,373 ERROR [STDERR] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(

17:05:27,373 ERROR [STDERR] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(

17:05:27,373 ERROR [STDERR] at


0 Replies


Not applicable
...<br />...17:05:27,389 ERROR [STDERR] at sun.rmi.transport.Transport.serviceCall(<br />17:05:27,389 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport.handleMessages(<br />17:05:27,389 ERROR [STDERR] at sun.rmi.transport.tcp.TCPTransport$<br />17:05:27,389 ERROR [STDERR] at<br />17:05:27,389 ERROR [STDERR] Caused by: com.adobe.livecycle.formsservice.exception.FormServerException: Parse error on document: DataSets error: Parse error on document: FSRequest error: Content is not allowed in prolog.<br />17:05:27,389 ERROR [STDERR] at com.adobe.formServer.DataSets.<init>(<br />17:05:27,389 ERROR [STDERR] at com.adobe.formServer.FSRequest.getDataSets(<br />17:05:27,389 ERROR [STDERR] at com.adobe.formServer.RunTimeContext.commonInit(<br />17:05:27,389 ERROR [STDERR] at com.adobe.formServer.RunTimeContext.<init>(<br />17:05:27,389 ERROR [STDERR] at com.adobe.formServer.FormServer.doProcessFormSubmission(<br />17:05:27,389 ERROR [STDERR] ... 86 more<br /><br />My java code for this HTTP button is<br /><br />//Create a ServiceClientFactory object<br /> ServiceClientFactory myFactory = ServiceClientFactory.createInstance(connectionProps);<br />//Create a FormsServiceClient object<br /> FormsServiceClient formsClient = new FormsServiceClient(myFactory); <br /> String context = request.getContentType();<br /> //Get Form data to pass to the processFormSubmission method<br /> Document formData = new Document(request.getInputStream()); <br /> <br /> //Set run-time options<br /> RenderOptionsSpec processSpec = new RenderOptionsSpec(); <br /> processSpec.setLocale("en_US");<br /> <br /> //Invoke the processFormSubmission method<br /> FormsResult formOut;<br /> <br /> formOut = formsClient.processFormSubmission(formData,<br /> "CONTENT_TYPE=application/pdf&CONTENT_TYPE=application/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml",<br /> "",<br /> processSpec);<br /><br />and this error occurs when processFormSubmission is executed.<br /><br />The second button is a button with these javascript code on click event<br /><br /> var sURL = "http://localhost:8080/AdobeForms/receiveForm";<br /> var myDoc =;<br /><br /> var sValors = "datasets,pdf";<br /> var aPaquetes = sValors.split(",");<br /> var sAs = "PDF";<br /><br /> try{<br />"starting...");<br /> myDoc.submitForm({<br /> cURL:sURL, <br /> cSubmitAs:sAs,<br /> aPackets:aPaquetes});<br />"finish");<br /> }<br /> catch(e){<br /> console.println(e);<br /> }<br /><br />but using this button, my servlet doesn't receive pdf form. <br /><br />Someone can help me? Any idea about these errors? Any tip will be very apreciated. <br /><br />Thanks in advance<br /><br />Daniel


Level 10
I'm confused! Do you have all that code on the submit button within you form?

You don't need any code on the HTTP button on the form. The only thing you need to set is the target url of the button (where it submits to) and what it submits (PDF, XDP, XML).

The it'll post that to your servlet.

Am I missing something?



Not applicable
Hi Jasmin

I think I didn't explain it very well. Sorry for that. When I said "java code for this HTTP button" I wanted to say it's the java code in my servlet. it's execute when I click on HTTP button. But I have could resolve this error. I have change this http button for another button with submit event calling to my servlet. Now it's working but i have found a new problem.

I have this form xdp and a data connection with a xml file. When I render it with LC Forms I can see my form right but when I submit the form, I receive only data connection structure but not my xdp structure. I think it can be a design problem with my xdp. Any idea about this problem?

And I still the problem with second button

Thanks for your help Jasmin


Level 10
"I receive only data connection structure but not my xdp structure"

When you submit the data, the data will follow the structure of the data connection. That's the purpose of a data connection, so you can do data binding with the fields on your form and have the data follow a certain structure.

If you don't have a data connection setup, then it'll follow the xdp structure.

What is the problem with the second button again?



Not applicable
Ah, ok, I understand it. My structure of the data connection was wrong. Now I receive the new structure with the fields on your form but it's empty. Don't should it send with datas or do I have to do a previous step?

About the second button it has this javascript code on click event

var sURL = "http://localhost:8080/AdobeForms/receiveForm";

var myDoc =;

var sValors = "datasets,pdf";

var aPaquetes = sValors.split(",");

var sAs = "PDF";










but clicking this button, my servlet doesn't receive the pdf form and I haven't idea about this error

Thanks Jasmin for your help.


Not applicable
I have fix the first error. I received the data structure empty because it didn't bind with my fields. It was a design problem but it's resolve and it works fine 🙂

Thanks again for your help



Level 10
For the second problem.

I would remove that script from the button. Make sure it's just a regular button with no script.

Then change the property of the button to be a Submit button and use the UI (submit tab) to change the target URL and the what you want to submit (XDP,XML,PDF).

Let's just use the built in stuff instead and see if that works first.



Not applicable
It works fine with your suggestion. Thank you very much for your help


Not applicable
Hi Jasmin,<br /><br />I have found another problem. I receive the structure with the fields on my form but some of these fields are in a dynamic table. This table has this structure on my xdp<br /><br />Table<br />-Field<br />--province<br />--road<br />--locations<br /><br />and you can add more fields with the same structure<br /><br />The xml file for this structure is<br /><Table><br /> <province></province><br /> <road></road><br /> <location></location><br /></Tabla><br /><br />My problem is with this xml file, if I add some more fields dynamically, I receive only the first file of my table. How could I do if I want to receive all fields and bind them with my xml file? Any idea?<br /><br />Thank you very much for your help<br /><br />Regards<br /><br />Dani


Level 10
You should receive all fields in the xml.

Can you write the content to the file system to make sure you only have the one row. Your xPath expression might only give you the first row, but the rows might all be there.


The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now