on 09-26-2013 4:11 PM
Hi All,
I am using ignore option of Empty Message Handling in receiver file adapter to avoid creation of 0 byte files. But the output payload is having root message, so it creates empty output file with zero byte size.
And as mentioned in mentioned in SAP Note 0000821267 - FAQ File Adapter, there are 2 solutions i.e. Java mapping and use of StrictXml2PlainBean.
I referred below links also and created java mapping.
http://scn.sap.com/thread/3162134
At OM level it is generating blank output at the target.
It is removing the root tag and avoids the output file creation but the receiver CC channel is throwing below error.
“Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.lang.Exception: Exception in XML Parser (format problem?):'org.xml.sax.SAXParseException: Content is not allowed in prolog.'”
Also CC audit log shows message "Write to file <DIRECTORYPATH\FILENAME> as text (encoding UTF-8) size 1 bytes."
I am trying to figure out the cause of 1 bytes size.
Please let me know your thoughts and if someone has faced similar issue, pls provide inputs.
Regards,
Pranil.
Hi Pranil,
Could you please let me know how the issue premature end of file is resolved.
Thanks & Regards,
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
Thanks a lot for your inputs.
Tried to find out the root cause of the error SAXParseException: Content is not allowed in prolog and found that in ESR at OM level when I run the Java mapping step, it gives a blank output removing root tag as required.
But when I clicked on the "pretty print" box of output, it gives me below error.
i.e. "org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file. "
Trying to find out the reason for this error now.
Please let me know your thoughts and inputs.
Regards,
Pranil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pranil,
Can you pls ask basis team to schedule a job called empty output generated.What it will do,it will automatically cancel those mesage which are not carrying any data and it will help you to improve the performance of the PI.
Regards,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishnu,
A few cents,
Check this Shabarish Vijayakumar's blog http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/08/16/the-mystery-of-content-is-not-all..., it could be helpful for you.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pranil,
Ideally after removing the root element, it should work fine and not create empty files.
please check the output of your Java mapping.
I looked around for this error....
Please check the link below:
http://scn.sap.com/thread/1765227
Copying some text from another link.
This error message is always caused by the invalid XML content in the beginning element. For example, extra small dot “.” in the beginning of XML element.
Any characters before the “<?xml….” will cause above “org.xml.sax.SAXParseException: Content is not allowed in prolog” error message.
Hope it helps!
Ambrish
Ambrish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I suspect the issue is due to the (encoding="utf-8") in the prolog. if there is any way that you can get rid of this right from the beginning, then probably this issue may not arise. The encoding can cause some additional bytes/ spaces/ spl characters (invisible in the webbrowser).
What kind of mapping do you use? Just see if it is possible to have only <?xml version="1.0"?> in your message. At least to do a local test, to know if this is causing the issue.
good luck
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.