Exception in XML Parsing:Premature End of file.
Hii
I am geting exception in XML pasing in following line
doc=parser.parse(new File(sFileName));
if any one kno about this then plz send me solution and reason of this exception.
Thanks
Your XML file is malformed.
Similar Messages
-
Hi folks,
I am using a cascaded mapping in my OM. I have a graphical mapping followed by the Java mapping. It is a flat file to IDOC mapping. Everything works fine in Dev but when I transport the same objects to QA, the Operation mapping though it doesn't fail in ESR testing tool, gives the following message and there is no output generated for the same payload which is successfully tested in DEV. Please advise on what could be the possible reasons.
Unable to display tree view; Error when parsing an XML document (Premature end of file.)kalyan,
There seems to be an invalid xml payload which causes this error in ESR not generating the tree view. Please find the similar error screenshot and rectify the payload.
Mutti -
Help - Premature end of file Exception while using saaj
Hi Everyone,
I have written a sample saaj client, with a string as an attachment and trying to send it to a servlet as shown in the example below:
* SaajClient.java
* Created on June 23, 2004, 5:49 PM
* @author Krishna Menon
import javax.xml.soap.*;
import javax.xml.messaging.URLEndpoint;
public class SaajClient {
public SaajClient() throws Exception
try{
SOAPMessage soapMessage = MessageFactory.newInstance().createMessage();
SOAPPart soapPart = soapMessage.getSOAPPart();
SOAPEnvelope envelope = soapPart.getEnvelope();
SOAPHeader header = envelope.getHeader();
SOAPBody body = envelope.getBody();
header.detachNode();
String str = "Something a;alskdjf;laksjdfl;akjsdf;lk ;alskdjfl;asjdfl;ajk ;kdls a;kl";
if(soapMessage != null)
AttachmentPart attachment = soapMessage.createAttachmentPart();
attachment.setContentType("text/plain");
attachment.setContent(str,"text/plain");
attachment.setContentId("Sample_String");
soapMessage.addAttachmentPart(attachment);
soapMessage.saveChanges();
SOAPConnection connection = SOAPConnectionFactory.newInstance().createConnection();
URLEndpoint endpoint = new URLEndpoint("http://10.2.1.132:8080/WebServices/servlet/AttachmentReceiver");
SOAPMessage response = connection.call(soapMessage,endpoint);
response.writeTo(System.out);
}catch(Exception e)
System.out.println("Caught in constructor");
e.printStackTrace();
public static void main(String args[])
try
SaajClient client = new SaajClient();
}catch(Exception e)
e.printStackTrace();
When I run the above program, it is giving the following exception:
Caught in constructor
javax.xml.soap.SOAPException: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:110)
at SaajClient.<init>(SaajClient.java:58)
at SaajClient.main(SaajClient.java:74)
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:543)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:1753)
at org.apache.axis.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:105)
... 2 more
Caused by: org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1139)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
... 7 more
If anybody has a solution for it, please post it here.
Thanks in advance,
With Regards,
Krishna Menon. B.Hi
Actually the problem is not with the client but with the servlet I think. In the servlet, I am able to retrieve the attachment and print its content. After receiving the Message, I am creating a new message and populating its body with a new child element and returning the message back to the client. Just Before returning the message, I am getting the Axis Fault error in the log file. I am giving the code for the Servlet I have used below:
* AttachmentReceiver.java
* Created on June 23, 2004, 7:11 PM
* @author Krishna Menon
import java.util.Iterator;
import javax.servlet.ServletException;
import javax.xml.messaging.JAXMServlet;
import javax.xml.messaging.ReqRespListener;
import javax.xml.soap.AttachmentPart;
import javax.xml.soap.MessageFactory;
import javax.xml.soap.SOAPEnvelope;
import javax.xml.soap.SOAPMessage;
import javax.xml.soap.SOAPPart;
import javax.xml.soap.SOAPFactory;
* Servlet that accepts a SOAP message and looks through
* its attachments before sending the SOAP part of the message
* to the console and sending back a response
* @author Krishna Menon
public class AttachmentReceiver extends JAXMServlet implements ReqRespListener {
private MessageFactory fac;
public void init() throws ServletException {
try {
fac = MessageFactory.newInstance();
catch( Exception ex ) {
System.out.println("In AttachmentReceiver init");
ex.printStackTrace();
throw new ServletException( ex );
// This is the application code for handling the message.. Once the
// message is received the application can retrieve the soap part, the
// attachment part if there are any, or any other information from the
// message.
public SOAPMessage onMessage( SOAPMessage message ) {
System.out.println( "On message called in receiving servlet" );
try {
System.out.println( "\nMessage Received: " );
System.out.println( "\n============ start ============\n" );
// dump out attachments
System.out.println( "Number of Attachments: " + message.countAttachments() );
int i = 1;
for( Iterator it = message.getAttachments(); it.hasNext(); i++ ) {
AttachmentPart ap = (AttachmentPart) it.next();
System.out.println( "Attachment #" + i + " content type : " +
ap.getContentType() );
System.out.println("Attachment Content ::"+ap.getContent());
// dump out the SOAP part of the message
SOAPPart soapPart = message.getSOAPPart();
System.out.println( "SOAP Part of Message:\n\n" + soapPart );
System.out.println( "\n============ end ===========\n" );
SOAPMessage msg = fac.createMessage();
SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
SOAPFactory soapFactory = SOAPFactory.newInstance();
System.out.println("Before getBody");
env.getBody().addChildElement(soapFactory.createName("MessageResponse")).addTextNode("From Attachment Servlet"+"\nYour Attachment Received");
System.out.println("After getBody");
//addChildElement("MessageResponse").addTextNode("From Attachment Servlet"+"\nYour Attachment Received");
msg.saveChanges();
System.out.println("After Msg Save Changes");
return msg;
catch( Exception e ) {
System.out.println("From OnMessage() of AttachmentReceiver");
e.printStackTrace();
return null;
This is generating the following series of errors in the catalina.out (Tomcat4.1 error log ) file:
On message called in receiving servlet
Message Received:
============ start ============
Number of Attachments: 1
Attachment #1 content type : text/plain
SOAP Part of Message:
org.apache.axis.SOAPPart@16fdac
============ end ===========
- java.io.IOException:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.ClassCastException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: java.lang.ClassCastException
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:173)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:509)
at org.apache.axis.message.MessageElement.output(MessageElement.java:783)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:270)
at org.apache.axis.Message.writeTo(Message.java:440)
at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
java.lang.ClassCastException
at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:272)
at org.apache.axis.Message.writeTo(Message.java:440)
at javax.xml.messaging.JAXMServlet.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown Source)
at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContextValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.valves.ErrorReportValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.catalina.core.StandardEngineValve.invoke(Unknown Source)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(Unknown Source)
at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassCastException
at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:173)
at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:509)
at org.apache.axis.message.MessageElement.output(MessageElement.java:783)
at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:270)
... 33 more -
BI services error "Data parsing failed, premature end of file".
Hi all,
we are facing issue while using BI services whenever we are trying to drill data its showing the error as "Data parsing failed contact your system administrator,premature end of file".
please share with me if anyone has faced the same error anytime.
thank in advance for your valuable suggestions.
Thanks,
karan.Hi,
Please check whether the RFC imported by you contain the exact elements of XML. I feel the RFC generated does not contain proper XML schema.
Regards
Krish -
Attempt to process file failed with Exception in XML Parser-format problem
Hi all,
Iam getting an unusual error in the J2EE stack in XI.
And the message is:
006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)' 2006-11-30 17:31:07 Error Exception caught by adapter framework: null 2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
My scenerio iam posting IDOC to a flat file with content conversion in the receiver side,the mapping got executed successfully and in the audit log i found that the error was after the 'Start converting XML document content to plain text'.
This means that error occured during content conversion of XML to the prescribed file format.
Can anyone suggest any better approach using which we may trace the junk data in IDoc. Manual adhoc approach could take time and is error prone.
Thanks in advance...
karunHi Bhavesh,
Thanks for the early reply. I checked the mapping and everything is fine and the output is also in valid XML format.
The audit log shows that the mapping got executed successfully and the error is after the step 'Start converting XML document content to plain text '. Is there any constraint in the file adapter regarding the message size for parsing.
2006-11-30 17:30:50 Success Transfer: "BIN" mode, size 2912595 bytes, character encoding -
2006-11-30 17:30:50 Success Start converting XML document content to plain text
2006-11-30 17:31:07 Error Attempt to process file failed with Exception in XML Parser (format problem?):'com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)(:main:, row=1, col=1044002) -> com.sap.engine.lib.xml.parser.ParserException: Invalid char #0xf(:main:, row:1, col:1044002)'
2006-11-30 17:31:07 Error Exception caught by adapter framework: null
2006-11-30 17:31:07 Error Delivery of the message to the application using connection AFW failed, due to: RecoverableException.
2006-11-30 17:31:07 Success The asynchronous message was successfully scheduled to be delivered at Thu Nov 30 17:36:07 GMT 2006.
2006-11-30 17:31:07 Success The message status set to WAIT.
2006-11-30 17:31:08 Success Acknowledgement creation triggered for type: SystemErrorAck
2006-11-30 17:31:08 Success Acknowledgement sent successfully for type: SystemErrorAck
2006-11-30 17:36:08 Success Retrying to deliver message to the application. Retry: 1 -
SAXParseException: premature end of file in creating WARs
Hi,
I stronlgy follow the hints provided in J2EE tutorial to create some WARs from sample code,
all is OK with compiling, however when I save my work (where ir is required in text), I get the following
message
....WAR is corrupt or cannot be read
SAXParseExcpetion: Premature end of file
Where is cause for this? Additionally - when I try to install provided wars, all is OK (resp. I think that my installation work - J2EE 1.4 beta 2)
Well during creating wars there is some reports about some bug which prevents to write URL directly during creation of war - could the cause be hidden here?
Thanks for repliesbut I feel that .xml files should be correct - I try
build samples and I get this error both for web
applications and web service applications.Doesn't matter what you feel or assume. Are they correct or aren't they? The web and SOAP servers seem to think something's wrong. You ought to be checking all the XML that they touch to find out what's bothering them.
I can't say that I know, but if you're getting a SAX parse exception an invalid web.xml will do it. They've got to be valid against the DTD for the web.xml. Have you verified your web.xml against the DTD? Will a browser or an app like XML Spy validate it for you?
If you've checked it and found that it's okay, then I'm incorrect and you need to look at something else. But "feeling" that they're right isn't the same thing as being 100% certain because you've had a tool validate it against the DTD. -
FILE_to_RFC (Premature end of file)
Hello,
I'm trying to setup a FILE_to_RFC connection.
Let me explain what I want to do .
External systems sends files which should linked to SAP documents that users can later see with FB03.
This can be done by function module ARCHIV_CREATE_SYNCHRON_META or similar, but only this is remote-enabled.
Here an example:
External system sends for e.g. 3 files. All files are located in file-system.
1. file : file-aaa.pdf
2. file: file-bbb-pdf
3. file: upload.txt
Content of third file:
company-code, SAP-document number, year, file-name
0400..................6800004711...................2008..file-aaa.pdf
0400.................48000004712..................2009, file-bbb.pdf
FILE-Sender-channel is polling for the file "upload.txt". This file will convert from text to XM by Adapter, so far ok. .
RFC-Receiver-channel so far ok. Using imported RFC function module
Test Message-Mappng : OK ( MT_INVOICES --> ARCHIV_CREATE_SYNCHRON_META )
Test.Operation-Maping: OK
But the process failed with following errors: , File "upload.txt" has been archived but no other activities.
==============================================================================
SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_MT_INVOICES_to_ARCHIV_CREATE_SY~</SAP:P1>
<SAP:P2>com.sap.aii.mappingtool.tf7.IllegalInstanceExcepti</SAP:P2>
<SAP:P3>on: Cannot create target element /ns1:ARCHIV_CREAT</SAP:P3>
<SAP:P4>E_SYNCHRON_META/AR_OBJECT. Values missing in queu~</SAP:P4>
<SAP:AdditionalText />
<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_INVOICES_to_ARCHIV_CREATE_SY; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns1:ARCHIV_CREATE_SYNCHRON_META/AR_OBJECT. Values missing in queu</SAP:Stack>
Test-Result of configuration in the Integration Builder:
======================================
Runtime exception occurred during application mapping com/sap/xi/tf/_MM_MT_INVOICES_to_ARCHIV_CREATE_SY~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Premature end of file.
Maybe somebody can help here ?The payload is following: I imported this into the test area.
<?xml version="1.0" encoding="utf-8" ?>
<MT_INVOICES>
<Recordset>
<ROW>
<TEXT1>EFLOW</TEXT1>
<TEXT2>FI_DOCUMENTS</TEXT2>
<SAP_DOCUMENT>4300005878</SAP_DOCUMENT>
<COMPANY_CODE>0401</COMPANY_CODE>
<YEAR>2005</YEAR>
<FILE_NAME>file-1.gif</FILE_NAME>
<FILE_TYPE>GIF</FILE_TYPE>
</ROW>
</Recordset>
</MT_INVOICES>
Below the XSD schema of the data type
<xsd:complexType name="DT_INVOICES">
<xsd:annotation>
<xsd:documentation xml:lang="EN">
Scanned invoices of eflow system
</xsd:documentation>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="Recordset">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ROW" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="TEXT1" type="xsd:string" />
<xsd:element name="TEXT2" type="xsd:string" />
<xsd:element name="SAP_DOCUMENT" type="xsd:string" />
<xsd:element name="COMPANY_CODE" type="xsd:string" />
<xsd:element name="YEAR" type="xsd:string" />
<xsd:element name="FILE_NAME" type="xsd:string" />
<xsd:element name="FILE_TYPE" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
So I see here no difference !. -
OSB 11g - testing Business service throws Premature end of file.
Hi,
I am testing a business service which invokes a webservice. I have a load balancer.
When testing business service from test console, I get the error "SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file."
I tried the following options:
1. Changed <http:Connection> to close
2. Added -DHTTPClient.disableKeepAlives=true in console - Servers-osbserver - Server Start
Any pointers will be helpful.
Thanks
Ganesh
Error:
The invocation resulted in an error: Internal Server Error.
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body xmlns:m="urn:www.my-url.com">
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client.XMLFormatError</faultcode>
<faultstring>Client XML Format Error</faultstring>
<detail>
<XML_PARSING_EXCEPTION>
35: SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file.
</XML_PARSING_EXCEPTION>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Response Metadata
<con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
<tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<tran:user-header name="Expires" value="Mon, 10 Jan 2011 17:49:17 CST"/>
<tran:user-header name="Last-Modified" value="Mon, 10 Jan 2011 17:49:17 CST"/>
<http:Cache-Control>no-cache, no-store</http:Cache-Control>
<http:Connection>Keep-Alive</http:Connection>
<http:Content-Length>657</http:Content-Length>
<http:Content-Type>text/xml</http:Content-Type>
<http:Date>Mon, 10 Jan 2011 17:49:17 CST</http:Date>
<http:Server>j2se/1.5x</http:Server>
</tran:headers>
<tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">2</tran:response-code>
<tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">Internal Server Error</tran:response-message>
<tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">iso-8859-1</tran:encoding>
<http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">500</http:http-response-code>
</con:metadata>35: SoapService.doPost: unparseable XML in client Soap request, exception: org.xml.sax.SAXParseException: Premature end of file.I am not sure but may be that the XML which you are passing as input, has got corrupted. Cross check the input XML and if possible use different input.
Regards,
Anuj -
Premature end of file failure in Proxy-SFTP scenario
Hi All,
We had this asych. scenario working until, we got a request to send field names in the payload.
In the receiver communication channel, under Module tab I've defined as below:
Processing Sequence
1 AF_Modules/StrictXml2PlainBean Local Enterprise Bean 0
Module configuration:
Module Key Parameter Name Parameter value
0 addHeaderLine fromXML
0 dataRec.fieldSeparator |
0 singleRecordType dataRec
Now when we try to send data its failing with the below message:
Starting strict XML to plain text conversion
2011-09-28 12:16:26 Error Adapter Framework caught exception: Premature end of file.
2011-09-28 12:16:26 Error Delivering the message to the application using connection SFTP_http://seeburger.com/xi failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: org.xml.sax.SAXParseException: Premature end of file..
2011-09-28 12:16:26 Information The message status was set to WAIT.
Please can anyone help with this? Am I missing something here?
Thanks,
Priya.check out this link. it might help you..
File Content Conversion Error in PI 7.1 (file to Proxy) -
Premature end of file Error in the File conversion
Hi Experts
Working on File to Proxy scenario and file is picking up by the XI server and in the message mapping I am receiving the following error
Can anyone let me know what is Premature end of file, Do I need to specify any parameter in the Content Conversion additional than normal parameters
Thanks
PR
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Request Message Mapping
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>Application</SAP:Category>
<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>
<SAP:P1>com/sap/xi/tf/_MM_ISO_to_ECC_FROI_SROI_TA_TE_TR_T~</SAP:P1>
<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException:</SAP:P2>
<SAP:P3>Premature end of file.</SAP:P3>
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>Runtime exception occurred during application mapping com/sap/xi/tf/_MM_ISO_to_ECC_FROI_SROI_TA_TE_TR_T~; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Premature end of file.</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>check out this link. it might help you..
File Content Conversion Error in PI 7.1 (file to Proxy) -
ParseXml, "Premature end of file" error
I have made an online PDF submission script for a form on my site. For the most part, it has been working fine. However, over the past few days, I have gotten a number of error emails that I have setup with people having submission errors.
Here is what I am getting:
Error Type: Expression
Error Message: An error occured while Parsing an XML document.
Error Details: Premature end of file.
This is what I use to grab the XML:
<CFSET pdfXml=#ToString(GetHttpRequestData().Content)#>
<CFSET xmlData=#XmlParse(pdfXml)#>
These lines occur like the third or fourth line in the script, and the lines before it are for a CFTRY and another CFSET variable.
Any idea as to what might be causing this error? Since it works for 99% of the people, I think it is a problem with the system/server rather than the script...
Thanks in advance for any help with this!I'm seeing the same behavior as you with my Coldfusion Web Service. Possibly a bug in GetHTTPRequestData function in CF? References:
http://www.bennadel.com/blog/1602-GetHTTPRequestData-Breaks-The-SOAP-Request-Response-Cycl e-In-ColdFusion.htm
http://www.petefreitag.com/item/733.cfm
I'm trying to find workarounds for this problem too. If I find something I'll post it here. -
"Premature end of file" when reading in a GZIP file!
Hello i'm trying to figure out what may be causing a "Premature end of file" when reading in a GZIP file!
Basically, what i'm trying to do is read a GZIP file, create an XML file in GZIP format and then validate the GZIPed XML file using the SAX validator and this process works fine for LOW volume data, but for HIGH volume data it seems to have several problems. One problem i was getting was 'Corrupt GZIP trailer', which seems to be a known bug, used an override here and it's ok, and now i'm getting the 'Premature end of file error'.
Here is the error report, see <<<<<<<<<!
START: Wed Aug 03 12:03:41 EDT 2005
Runparms :
host: ....
port: ....
sid: ....
usr: ....
site: ....
val_type: HVPEZ -- previously HVPEX, reason, reading zip file (.gz)
dbo: NULL
ddl: /home/......../HLPVAL/DAT/hlp_ddl_file
table: ......
db_name: NULL
dat_file: /..../...../....../xxxxxxx1.dat.gz
xsd: /home/....../....../XSD/xxxxxxx1.xsd
sql: NULL
debug: NULL
sql query null
pid: 11751
xml: /home/.........../...../XML/xxxxxx1.dat_HVPEZ_xml.gz
rep: /home/.........../...../XML/xxxxxx1.dat_HVPEZ.valrep
fatalError:
setValidity:
Error number : 1
Error starts on line number : 1302706816
Error starts on column position: 8
Error text is : org.xml.sax.SAXParseException: Premature end of file. <<<<<<<<<<<
org.xml.sax.SAXParseException: Premature end of file.
Here i'm reading in a GZIPed file, i then generate the XML and write out another GZIPed file, see <<<<<<<<<<:
try {
GZIPOutputStream gz = new GZIPOutputStream(new FileOutputStream(xp.xml_file)); >>>>>>>> out GZIPed
PrintWriter outf = new PrintWriter (gz);
GZIPInputStream in = new GZIPInputStream(new FileInputStream(xp.dat_file),4096); <<<<<< in GZIPed
byte[] buf = new byte[4096];int len=0; String[] sa = new String[NUM_COLS]; int bj=0; char[] ca=new char[1500];
while ((len = in.read(buf)) > 0)
String hrec = new String();
for (int b=0;b<len;b++)
Byte byt=new Byte(buf); int bi=byt.intValue(); char c=(char)bi; ca[bj]=c;
if (c == '\n')
hrec=new String(ca); hrec=hrec.trim();
for (int k=0;k<1500;k++) ca [k]=' ';
int prevj=0; j=0;int fcnt=0;
for (int w=0; w<hrec.length(); w++)
if (hrec.charAt(w)=='|')
sa[j]=hrec.substring(prevj,w);fcnt++;
j++; prevj=w+1;
sa[j]=hrec.substring(prevj,hrec.length());fcnt++; bj=-1;
for (int i = 0; i < NUM_COLS; i++)
if (i>(sa.length-1)) { sToken = new String(); } else { sToken = sa[i]; }
if (sToken.indexOf('<')>-1 || sToken.indexOf('>')>-1 || sToken.indexOf('"')>-1 ||
sToken.indexOf('&')>-1 )
String sToken2 = new String();
sToken2 = normalize(sToken);
sToken = sToken2;
outf.write(" <"+_columnNames[i]+">"+sToken+"</"+_columnNames[i]+">"+"\n");
outf.write(" </"+FILE_NAME+">"+"\n");
bj++;
outf.write("</hlp_data>"+"\n");
outf.flush(); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here if tried every combination of close command ect.
outf.close();
gz.finish();
gz.close();
in.close();
Here i'm reading the GZIPed file from the previous program and this is where the 'Premature end of file' error is occurring. Notice that i'm using an extended class Called WorkingGZIPInputStream, this is to bypass the error message 'Corrupt GZIP trailer' message that seems to occur when processing high volume files, here's a previous link on issue:
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=011624
HlpValSax1 sx = new HlpValSax1();
SAXParser sp = sx.getParser(xp.xsd_file);
if (
xp.val_type.substring(0,5).equals("HVPEZ")
|| xp.val_type.substring(0,5).equals("HVPEX")
|| xp.val_type.substring(0,5).equals("HVOEX")
WorkingGZIPInputStream is = new WorkingGZIPInputStream(new FileInputStream(xp.xml_file),4096); <<<<<<<<<<
sp.parse(is,dh);
else
File file = new File(xp.xml_file);
InputStream is2 = new FileInputStream(file);
sp.parse(is2,dh);
catch (FileNotFoundException nf) {System.out.println(nf);}
catch (SAXException sa) {System.out.println(sa);}
catch (IOException io) {System.out.println(io);}Turns out things were not exactly the same. When I had done it from disk I would always create a new InputStream when reading the resource, when doing it from the Jar I was reusing it.
-
i am using toplink 10.1.3.0.0 with oracle app server 10.1.2.2, i am using change field optimistic locking and generating the project xml,
application runs great locally in the jdeveloper, but when it is deployed on app server getting following error
here are the headers from both my project.xml as well as session xml..
<?xml version="1.0" encoding="UTF-8"?>
<toplink:object-persistence version="Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)" xmlns:opm="http://xmlns.oracle.com/ias/xsds/opm" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:toplink="http://xmlns.oracle.com/ias/xsds/toplink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<opm:name>PROJ</opm:name>
<opm:class-mapping-descriptors>
<opm:class-mapping-descriptor xsi:type="toplink:relational-class-mapping-descriptor">
<?xml version="1.0" encoding="UTF-8"?>
<toplink-sessions version="4.5" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<session xsi:type="server-session">
<name>PROJSession</name>
<event-listener-classes/>
<logging xsi:type="toplink-log">
<log-level>finer</log-level>
</logging>
<primary-project xsi:type="xml">PROJ.xml</primary-project>
<login xsi:type="database-login">
<platform-class>oracle.toplink.platform.database.oracle.OraclePlatform</platform-class>
<user-name></user-name>
any help/idea appreciated...
Exception [TOPLINK-9005] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.SessionLoaderException
Exception Description: An exception was thrown while loading the <project-xml> file [PROJ.xml].
Internal Exception: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.XMLMarshalException
Exception Description: An error occurred unmarshalling the document
Internal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.platform.xml.XMLPlatformException
Exception Description: An error occurred while parsing the document.
Internal Exception: oracle.xml.parser.v2.XMLParseException: xsi:type "toplink:changed-field-locking-policy" not resolved to a type definition
at oracle.toplink.exceptions.SessionLoaderException.failedToLoadProjectXml(SessionLoaderException.java:74)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.loadProjectConfig(TopLinkSessionsFactory.java:316)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.createSession(TopLinkSessionsFactory.java:241)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildServerSessionConfig(TopLinkSessionsFactory.java:215)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildSession(TopLinkSessionsFactory.java:168)
at oracle.toplink.tools.sessionconfiguration.TopLinkSessionsFactory.buildTopLinkSessions(TopLinkSessionsFactory.java:124)
at oracle.toplink.tools.sessionconfiguration.XMLSessionConfigLoader.load(XMLSessionConfigLoader.java:103)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:367)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(SessionManager.java:334)
at myProjectPackage.common.data.toplink.ToplinkDataManagerPeer.<init>(ToplinkDataManagerPeer.java:41)
at myProjectPackage.common.data.DataManagerFactory.getDataManagerInstance(DataManagerFactory.java:40)
at myProjectPackage.common.servlet.NYSDOTFilter.getDataManager(NYSDOTFilter.java:964)
at myProjectPackage.common.servlet.NYSDOTFilter.doFilter(NYSDOTFilter.java:144)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
at myProjectPackage.caf.servlet.NYSDOTCAFFilter.doFilter(NYSDOTCAFFilter.java:90)
at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
at myProjectPackage.common.servlet.NYSDOTLoginFilter.doFilter(NYSDOTLoginFilter.java:95)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:669)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:340)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:228)
at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
at java.lang.Thread.run(Thread.java:570)first thanks for your reply,
i already figured that out and deployed it using 10.1.3.1 jars
my question
1) if it is a bug , how come it works fine with jdeveloper (
i would appreciate if you could provide any info about it.
2) i dont want to sound sarcastic , but 10.1.3.1 has of optimistic locking and the recommended solution i found was to use descriptor.getQueryManager().setUpdateCallCacheSize(0);
looks like 10.1.3.1 fixed one bug and introduced other one which was working fine earlier...
is there any other way of fixing optimistic locking issue other than using the
descriptor.getQueryManager().setUpdateCallCacheSize(0);
where i can find the latest/greatest (up to date patched version of toplink)
thanks again for your help -
Empty file handling in Receiver File adapter (FCC - Premature end of file)
Hi
My interface is Flat file to Flat File interface with file content conversion which is working fine in SAP PI 7.1 EHP1.
If I want to process the empty file from sender system, PI should place the same empty file in the receiver FTP Location as per my requirement.
I am facing the below error message when PI tries to place the empty file.
Message processing failed. Cause: org.xml.sax.SAXParseException: Premature end of file.
But if I am not using FCC, I am able to get the empty file at the receiver end.
Please suggest on this, If I am using FCC in the receiver side.
Thanks
GabrielHi Gabriel,
You can write a simple script to copy a file from source folder to target in case the fiel size is ZERO bytes. The script will not copy the file if the filesize is more than zero bytes, This will be processed normally by PI server. You can call the script from sender communication channel parameter : "RUN OS command before message processing". Could you please specify the Operating System (OS) you are using in your PI server.
Regards
Anupam -
Hi all,
I got the following exception while doing file to file scenario (with file content conversion)
Operation Mapping
INF137917_OM_Medicine
Runtime error
Runtime exception occurred during application mapping com/sap/xi/tf/_INF137917_MM_Medicine_; com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file.
I found this error in test configuration of Integration directory.
Please help me to find out the cause of it.Hi Ashu,
With what payload you are testing in the ID test tool? Should be from the SXMB_MONI ,isn't it ?
My view is that , there are error in the sender file adapter FCC which you have written.
Please try correcting the FCC error and your issue will be solved.Make sure you use correct parameters as FCC is case sensitive.
refer this help.sap link to analyse and correct your fcc error.
http://help.sap.com/saphelp_nw70/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
post if you have any specific erorr, as you seems to be very new to SDN , try searching for the error in Google/SDn and then if you dont get any way out ... SDN members will be more than happy to guide you .
Cheers,
Srinivas
Maybe you are looking for
-
Have two 4s's registered under the same apple account. The 1st phone was set up on the computer perfect. The second phone was set up by somebody who didn't know what they were doing and set this second phone up using the same apple id but onto a lapt
-
How to get the value of identity template
Hello, i have a AD resource and i want to get the identity model value in a form. Is it possible to do it ? Thanks
-
Transfer existing website to CS6 Business Catalyst as web host and few technical support issues
Hi, I need assistance with transferring an existing website - imagessays.com - (designed with Dreamweaver CS4) to my Creative Cloud CS6 account - to web hosting by CS6 Business Catalyst. Beyond that, need advice as to how to repair a coup
-
Report Viewer icon rendering issue with web controls
Hi, I have a sample application in ASP.NET 2.0 in which if I have a report viewer control in an aspx page and when I try to browse the page the report renders properly with all icons image also. But in the same application I am having a web user cont
-
Planning attributes in 11.1.2.2 and start/end dates in a cell
Hi. In Planning 11.1.2.2., can I make use of attribute dimensions as I would in a BSO Essbase cube? Also can I enter a start date and an end date entry in two different account members (e.g., start_date and end_date)? Thanks