Four Stars

[resolved] Error with ESB Service (Unexpected EOF in prolog)

I have a simple webservice created with Talend ESB, which receives a request, then reads an xml file and outputs 1..n rows to the response.
The service starts up normally, but when I call it, I get the error "org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at : ."
Can anyone help me with this? I don't understand the error message enough to even try anything to solve it.
Full exception:
elo 21, 2012 11:12:02 AP. org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://www.talend.org/service/}CurrentPriceLists#{http://www.talend.org/service/}CurrentPriceListsOp... 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 : .
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:73)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:50)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:46)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:119)
at org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:77)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:122)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(JettyHTTPDestination.java:344)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:310)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:72)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:943)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:879)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110)
at org.eclipse.jetty.server.Server.handle(Server.java:345)
at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:441)
at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:919)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:588)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:218)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:51)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:586)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:44)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:598)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:533)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at :
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:677)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2119)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2025)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1117)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:568)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:527)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:481)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:70)
... 27 more

7 REPLIES
One Star

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

Hi,
this error occurs if there's no output for the web service. As you see - the subjob was not invoked (there is no statistic info on the routes), so no data flowed to the tESBResponse.
For web services - I believe you still have to keep everything in one subjob. you can trigger further processing by "onComponentOk" or iterate links.
Have fun
Gabriel
Four Stars

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

Hi gusto2,
Thank you, changing the job to use "iterate" link from request instead of "on subjob ok" solved the issue.
One Star

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

Hi Gabriel,
you wrote "this error occurs if there's no output for the web service."
As you can see in the images I have output for the web service, but the error occurs.
Can anyone help me ?

Rebecca
Employee

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

is there some reason you need the log output from tXMLmap? The outputs from tXMLmap should be tied to some tESBresponse or tESBfault and I htink there should only be one path triggered.
One Star

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

There is no reason for the log output. It's only there, to see what the txmlMap produces.
If I start the job without the log output, I get the same error.
One Star

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

Rebecca,
as eoast wrote, try to create only one output flow
... -> tXMLMap -> tLogRow -> tESBResponse
to see the real output. The WS flow needs to be on one transaction and I don't know how multiple outputs affects this feature
Gabriel
One Star

Re: [resolved] Error with ESB Service (Unexpected EOF in prolog)

Gabriel,
as I wrote in my last reply, I have the same error without the complete tLogRow, but I test your suggestion.
You can see the result in the images. I have the same error, but the output of the tLogRow ("Beijing") is OK.

Rebecca