Expand my Community achievements bar.

document variable mapping in 'user' component causes SAXParseException

Avatar

Former Community Member
Hi,



the workflow I've set up contains a user component, which is mapped to a variable of type document. The variable gets populated with an e-mail attachment of type PDF, which the user sends to the workflow server. The attachment is extracted using the EmailReceiver QPAC. The form template of the user component is set to the XDP file, which corresponds to the PDF being sent.



The EmailReceiver QPAC works fine. No exceptions are thrown, no errors logged. But the user component repeatedly throws the same exception about a gazillion times:



> 2006-04-05 11:10:02,431 INFO [STDOUT] org.xml.sax.SAXParseException: Content is not allowed in prolog.

>

2006-04-05 11:10:02,431 INFO [STDOUT] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

>

2006-04-05 11:10:02,431 INFO [STDOUT] at javax.xml.parsers.SAXParser.parse(Unknown Source)

>

2006-04-05 11:10:02,431 INFO [STDOUT] at javax.xml.parsers.SAXParser.parse(Unknown Source)

>

2006-04-05 11:10:02,431 INFO [STDOUT] at com.adobe.fm.indexing.FormDataFieldExtractor.extractFields(FormDataFieldExtractor.java:160)

>

[...]



In the JBoss server log file the last line of this error reads:



> 2006-04-05 16:49:40,422 WARN [org.jboss.ejb.plugins.jms.DLQHandler] Message resent too many times; sending it to DLQ; message id=ID:xxxxxxxxxxxxxxxxxx



Interestingly though, the workflow works.



I learned that the 'Content is not allowed in prolog' error is sometimes related to whitespaces in the XML header. But neither in the PDF nor the XDP template are whitespaces in the header section. I also tried including and excluding an XML schema in the form. It didn't change the SAX Exception.



Does anyone have an idea, what peculiarities to take into account regarding the mapping of documents in the user component? What does the SAX Exception actually means?



Regards,

Steve
7 Replies

Avatar

Former Community Member
Hello -



The code that is throwing the exception is Form Manager code that does the full-text index of the Form data. In the case of "Form variable" data the format is already XML and can be indexed directly. In your case you have a Document object (which contains a PDF) as your data, and Form Manager first calls the submitForm() Form Server method to attempt to retrieve XML data that can be full-text indexed. The content not allowed in prolog error is probably caused by Form Server not returning XML for that form submission - it is probably returning the PDF.



In the end this looks like it might be a bug in the Form Manager indexer - it should swallow up this error and move on - since it doesn't know how to get XML data to index for that "Document".



So what is this PDF that is being recieved by the Email Reciever QPac? Is it a PDF that Form Server should understand - or is it just a plain PDF that cannot be processed by Form Server?



Also - you may try to remove the URL for the "Document" in the User QPac. It's possible this **might** workaround the problem.



Does that help to at least explain what could be happening?



Will@Adobe

Avatar

Former Community Member
For testing purposes I used a simple form, which solely contains two textfields and a submit button.

How is a PDF form supposed to actually look like in order for the form server being able to understand it?



Removing the URL for the document in the user QPAC funnily results in the
'No default queue found for user' exception.

Avatar

Former Community Member
In general Form Server can only process a form submit for a Form which was rendered by Form Server. I do not think that Form Server can handle a 'submit' from a Form which it did not render. That is probably what is going wrong here.



Just to re-iterate, the code that is breaking is Form Manager doing a full-text index on that form, and attempting to call Form server to get data out of it. If this exception should occur the Form Manager code should just swallow it up. (sounds like a bug to me).



Will@Adobe

Avatar

Former Community Member
Hi Will,



thank you for the explanation of the exception!



Actually, Form Server did render the form, I use. I let Form Server render an XDP file. But prior to submission of the form, I saved it as PDF to the local hard disk and then submitted it outside Form Manager.

Therefore, I think Form Manager should be able to handle the form, shouldn't it?

Should I contact Adobe Support?



Does anyone have a user component in use, whose mapping is set to a document type variable without getting exceptions in the JBoss server log file?



Steve

Avatar

Former Community Member
Hmm... so is it a PDF that was submitted? What kind of "submit" button are you using?

Avatar

Former Community Member
Maybe the problem is before the User QPAC. Are you sure the doc variable is being populated properly? Avoka has a useful QPAC called VariableLogger, I'd suggest grabbing it from their website and using it to print the contents of the doc var and make sure it looks correct.



Chris

Adobe Enterprise Developer Support

Avatar

Level 9
Hi Steve<br />We've also hit a really weird problem where the large xml comment block <!-- ... --> at the beginning of a submitted XML/XDP file causes problems. (It shouldn't, but it does.)<br /><br />Not sure if this is the same problem you're encountering, but one thing I'd suggest is download and use Avoka's DocumentImport QPAC to bypass the email receive step, and import an XML file from the file system, where it is easy to tweak the content. (As Chris recommends, Variable logger is also helpful.) Try removing all comments and see if that improves things.<br /><br />For Chris T and Mr Styles, this problem was reported to Adobe support MONTHS ago, and no response yet <nudge nudge...><br /><br />No wait! You're saying that you're working with PDF files directly. Yet the error you're getting is an XML parsing issue. If the User QPAC is trying to parse a PDF file as XML, no wonder it's getting lots of errors. I'd try using the Forms Submit QPAC to extract the XML from the PDF into an XML variable first, then use that in the User QPAC. Use VariableLogger to make sure it's working right. Let us know if that works.<br /><br />Howard<br />http://www.avoka.com