cancel
Showing results for 
Search instead for 
Did you mean: 

'org.xml.sax.SAXParseException: Premature end of file

Former Member
0 Kudos

Hi,

  The scenario which I am trying to configure is Mainframe(FTP)->PI->FileShare(File). I need to pick the file from mainframe , zip the file and save the file on to file share. The name of the zip file should be as the name of the source file. The steps which I have completed are:

1) Sender- Pick the file from Data set - PI has successfully picked up the file  and I have used content conversion to convert the flat file to xml. and the structure looks like <input>

                 <Record> </Record>

               </input>

               <input> 

                 <Record> </Record>

               </input>

Content Conversion is configured in a such a way that each Record element will hold the record line.

Content conversion is working fine.

2)  Receiver Side - Configured Message Transform Bean to convert the Xml to Plain and the paramters I have configured in the Module tab

Message Transform Bean is followed by PayloadZip Bean in order to zip the text file .

While Communication Channel converting the xml to Plain using Message Transfrom Beam.. The channel has ended up with the following error.

"Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.sdk.xi.adapter.trans.TransformException: Error converting Message: 'java.lang.Exception: Exception in XML Parser (format problem?):'org.xml.sax.SAXParseException: Premature end of file.''; nested exception caused by: java.lang.Exception: Exception in XML Parser (format problem?):'org.xml.sax.SAXParseException: Premature end of file.'

Could you let me know about the fix to resolve the above issue?

Regards,

Kiran.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Any clue on the error  which I am experiencing?

Regards,

Kiran.

former_member192892
Active Contributor
0 Kudos

Have you kept the mode as binary in your receiver file adapter? A very good blog which does the same thing as you require is attached for any further reference.

http://scn.sap.com/people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the...

Former Member
0 Kudos

Hi Varun,

Thanks for the blog, I have refered to the same blog while creating the scenario. Strange thing is.. the file is created successfully when I remove the payload zip bean from the module chain.. but i run in to issues when I insert payload zip bean..

"Have you kept the mode as binary in your receiver file adapter? A very good blog which does the same thing as you require is attached for any further reference" - Do I need to set the mode to binary?

Regards,

Kiran.

former_member192892
Active Contributor
0 Kudos

Hi Kiran,

Yes.. Your output is a zip file and not a text. You cannot have text encoding to a zip file and hence it would fail.

Regards

Varun

Former Member
0 Kudos

Hi,

I have resolved the issue. When I inlcude payload zip bean to zip the out put of MessageTransform bean. The Zip file has errored out with "Unrecoverable Zip file read error"

Regards,

Kiran.

iaki_vila
Active Contributor
0 Kudos

Hi,

Your file receiver parameter are right in my opinion, but i would change the line break char 'nl' by other thimg, only for testing purpose. Something is doing that the parser believes that there arent characters to proccess. Check that XML will go out with values between its tags, remove the zip module only for testing purposes (from easy way to more difficult, dont try to do all in the first attempt).

Regards.

Harish
Active Contributor
0 Kudos

Hi Kiran,

The problem is with content conversion of receiver communication channel or you have special character in the message. Please check the content conversion and special char in message.

Regards,

Harish

Former Member
0 Kudos

Hi Harish,

The xml message looks perfect. As I am able to Copy the xml to Message Mapping and I dont find any issues with the xml.

Regards,

Kiran.

Harish
Active Contributor
0 Kudos

Hi Kiran,

you need to check the content of XML message, please open the message in advance editors like NotePade++ and check if there is any special char in that.

Regards,

Harish