cancel
Showing results for 
Search instead for 
Did you mean: 

Runtime exception - premature end of life

former_member229310
Active Participant
0 Kudos

Hello,  This is Proxy to SOAP synchronous scenario.   During the mapping of response I am receiving the below message. When I test this by putting the same value in mapping it successfully executes whereas during runtime I am receiving below message.  Runtime exception occurred during application mapping com/sap/xi/tf/_mm_res; com.sap.aii.utilxi.misc.api.BaseRuntimeException:Premature end of file ------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<Trace level="3" type="T">Object ID of Interface Mapping 0064D6310CFD3CFD9251EAFFF8B02F99</Trace>

<Trace level="3" type="T">Version ID of Interface Mapping 72229B60757C11E0927DF4DBC0A80177</Trace>

<Trace level="1" type="T">Interface Mapping http://XYZcom/sap/pi/TEST/ OM_SAP_TO_BS</Trace>

<Trace level="3" type="T">Mapping Steps 1 JAVA_JDK com/sap/xi/tf/_MM_req</Trace>
<Trace level="3" type="T">MTOM Attachments are Transferred to the Payload</Trace>
<Trace level="1" type="T">Payload is empty.</Trace>
<Trace level="3" type="T">Dynamic Configuration Is Empty</Trace>
<Trace level="2" type="T">Mode 0</Trace>
<Trace level="2" type="T">Call method execute of the application Java mapping com.sap.xi.tf._MM_REQ</Trace>
<Trace level="1" type="T">*** START APPLICATION TRACE ***</Trace>
<Trace level="3" type="T">Document start</Trace>
<Trace level="1" type="T">*** END APPLICATION TRACE ***</Trace>
<Trace level="1" type="T">RuntimeException during appliction Java mapping com/sap/xi/tf/_MM_req Thrown: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file. at com.sap.aii.mappingtool.tf7.Transformer.checkParserException(Transformer.java:176) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:635) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:92) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:119) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor4046.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy565.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:267) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:182) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:280) Caused by: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file. at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:264) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:81) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:261) ... 1 more</Trace>

<Trace level="1" type="T">Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_req; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Premature end of file. Thrown: com.sap.aii.ib.core.mapping.execution.ApplicationRuntimeException: Runtime Exception when executing application mapping program com/sap/xi/tf/_MM_req; Details: com.sap.aii.utilxi.misc.api.BaseRuntimeException; Premature end of file. at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:118) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:119) at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72) at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79) at sun.reflect.GeneratedMethodAccessor4046.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at $Proxy565.processFunction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183) at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:267) at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37) at java.security.AccessController.doPrivileged(Native Method) at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:182) at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:280) Caused by: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file. at com.sap.aii.mappingtool.tf7.Transformer.checkParserException(Transformer.java:176) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:635) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:92) ... 38 more Caused by: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Premature end of file. at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:264) at com.sap.aii.mappingtool.tf7.rt.xparser.XParser.run(XParser.java:81) Caused by: org.xml.sax.SAXParseException: Premature end of file. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:230) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at com.sap.aii.mappingtool.tf7.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:261) ... 1 more</Trace>

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

enable logging of sync messages and put a real response to the mapping test tab and you will find the issue

Regards,

Michal Krawczyk

former_member229310
Active Participant
0 Kudos

Hi Michal,  I tested the runtime message available from moni into message mapping and operation mapping testing tab. It process without any errors.  I have also added the LOGGING_SYNC parameter & LOGGING_SYNC_PROPAGATION in sxmb_adm

former_member229310
Active Participant
0 Kudos

The response structure from message monitoring RWB and actual structure from message mapping are as attached. But the response message is not visible in moni whereas visible in message monitoring in RWB. When I use this message in mapping test tab it works correctly.

Former Member
0 Kudos

Hi Michal,

I received the same error today, your comments helped me lot to find solution...

Thanks for this.....

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Harsha ,

Michal is right,  I got the same error today & i found the solution.

This Error generated because there is no data/file has entered in "Operational mapping / Interface determination".

to find a solution for this go to "Message Mapping" and test your mapping by giving inputs in test tab, then copy that successful tested XML payload/file.

then go to "Interface Determination", then click on "Test Configuration" paste the successful copied  payload in "payload tab" and "run it", you will not get error because your payload is successful & payload has entered in "Interface Determination".

also try this out remove payload from "payload tab(keep payload tab empty)" then run it, you will get same error "Premature end of file",because payload has not entered in Operational mapping / Interface determination".

Hope this will help you lot......

former_member229310
Active Participant
0 Kudos

Hi Nikhil,  I tried your steps but what changes I need to make. The SOAP response structure is seen in RWB under message monitoring but not in MONI. So when I test this structure in response mapping it works.  What I feel is the WSDL response structure and response structure defined in mapping seems to be having problem. But i am confused why message is not visible in moni though i enabled the LOGGING_SYNC in SXMB_ADM.   Could you tell me what changes you did to resolve this..   Thanks for your replied.

Former Member
0 Kudos

Hi Harsha,

Please check Mapping and ID Configuration Parts, check if they are designed as required...

also check parameters in SXMB_ADM for Moni settings.

Former Member
0 Kudos

Check the business requirement and see target structure what you have and see that match with the message structure comes from the client and see you have taken all the measures to map all the response fields.

former_member229310
Active Participant
0 Kudos

Hello,  I tested the response real message payload avaialble in sxi_monitor and tested under message mapping .. The mapping is successful and no error is seen.

baskar_gopalakrishnan2
Active Contributor
0 Kudos

The response message from the target system might contains additional or conflict SOAP Header information or some conflict in the namespace tag with respect to their WSDL.  I think that's why during mapping step in IE, it fails whereas your test with just payload does not have issue in the mapping tool. You need to check the SOAP envelope and Header Tags. Check with target system any changes in their WSDL with regards to response message.


i.e  SOAP ENVELOPE contains SOAP HEADER + PAYLOAD.

Basically the error meaning that the response message has invalid syntax or formatting in the structure.