tXMLMap error 'com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog'

Problem Description

A Job using a tXMLMap component for every simple web service, fails with the following stack trace error:

statistics] connected
Apr 25, 2018 2:31:37 PM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFORMATION: Creating Service {http://www.talend.org/service/}EchoPlain from WSDL: C:/eclipse/Talend-Studio-20170623_1246-V6.4.1/workspace/.repositories/217161189/master/BI_BBS_E_AOO/services/EchoPlain_0.1.wsdl
Apr 25, 2018 2:31:38 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFORMATION: Setting the server's publish address to be http://localhost:8090/services/EchoPlain
2018-04-25 14:31:38.318:INFO:oejs.Server:jetty-8.1.14.v20131031
2018-04-25 14:31:38.512:INFO:oejs.AbstractConnector:Started SelectChannelConnector@localhost:8090
web service [endpoint: http://localhost:8090/services/EchoPlain] published
Apr 25, 2018 2:32:02 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNUNG: Interceptor for {http://www.talend.org/service/}EchoPlain#{http://www.talend.org/service/}EchoPlainOperation has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [2,0].
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:115)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:65)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:53)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:137)
at org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:262)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:76)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [2,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:795)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:724)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:648)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:111)
... 28 more

 

Root Cause

The tXMLMap component setup is not correct.

 

Solution

To resolve the issue, perform the following steps:

  1. Select Service, right-click your Service and select Import WSDL Schemas.

  2. Double-click the tXMLMap component to display the mapping editor. Then, in row1 of the input table, right-click payload and select Import from repository.

  3. In the Metadata window that appears, select Metadata > File xml > www-talend-org > service > xxxxPortType > xxxxxOperation > metadata.

  4. In the output table, delete the current value of the Expression field.

  5. Reconfigure the mapping between the input and output table.

Version history
Revision #:
9 of 9
Last update:
‎07-05-2019 04:01 AM
Updated by: