cancel
Showing results for 
Search instead for 
Did you mean: 

Premature end of file - JMS Sender

martini
Explorer
0 Kudos

Hi Gurus,

I've the following scenario: JMS Provider (WebSphereMQ) to IDOC (DEBMAS05). So, it's between AS400 (With MQSeries 6) and SAP ERP.


Steps:

  • When the client makes a modification to a record, it generates a message to a MQ queue. For example a new email address...

  • Then I check that I have a message in the appropriate queue XXXX.POLL.001.

  • I use the "12" option, to work with the message.

  • With "8" I can see the message.


  • Here, the message is truncated to view it. (has more than 1024 bytes). This is my first question, SAP PI takes all data from the queue or only the first 1024 bytes?

  • I have seen the MQ queue for the customer by another program and this is 34598 bytes.

  • In SAP PI, I've configured the sender channel at the "module" with the MessageTransformBean module. The key name is Plain2XML. Here, I built (using parameters) the transformation to a complex xml.


The beginning of module...



At the end of Module...

  • For example, some data like "ShippingData" is empty in the original message in the MQ queue. Here my second question, SAP PI data takes into account the "Shipping Data" and transforms it into empty XML elements or do not take into account?


  • The JMS Sender Channel, take the message without problems..

  • I've opened the soap message created by the JMS adapter...

  • I use a program to see the SOAP message (Notepad + +) and I can see that it is truncated and contains the xml stated in the JMS channel.

  • Then, I see the Log Viewer to know the error...

The error message is the following:

  • When I go for details...

Tracing for additional info - MTSaxHandler.run:
Thrown:
org.xml.sax.SAXParseException: Premature end of file.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1476)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1078)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:513) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:744)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:128)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:543)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:273)
at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:112)

  • As can be seen the error appears: "Premature end of file.". Causing the error in mapping the elements. Anyone have any idea how to put parameter in JMS sender channel to take more than 1024 bytes message.

Thanks a lot!



Accepted Solutions (1)

Accepted Solutions (1)

martini
Explorer
0 Kudos

Thanks to all, for a better response go to the following thread:

Martin.

Answers (1)

Answers (1)

Harish
Active Contributor
0 Kudos

Hi Martin,

SAP PI takes all data from the queue or only the first 1024 bytes?

-->> SAP PI takes data from the queue.

SAP PI data takes into account the "Shipping Data" and transforms it into empty XML elements or do not take into account?

--> your files seems to be fixed length, so in case of fixed length flat file PI expect blank if element is not present. And it will create emplty node.

It seems that your file has special char (not in UTF-8). Check the file and try to process without special char.

regards,

Harish

martini
Explorer
0 Kudos

This message was moderated.