One Star

Unexpected EOF in prolog error when no output to ESBProviderResponse

Hi,
I am trying to handle 0 rows output in webservice response. If I do not handle this scenario, I get exception in response:
"Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog"
Can you please suggest a workaround in such a way that I can output response like "No rows returned"? Below is mapping. Also attached image.
MysqlInput--->main---->tMap --> tJavaRow --->tXMLMap --> tESBProviderResponse
MysqlInput->lookup ------^
4 REPLIES
Community Manager

Re: Unexpected EOF in prolog error when no output to ESBProviderResponse

Hi
You are doing an inner join on tMap or tXMLMap, so you can add another output table and set the option 'capture lookup inner join' as true to capture the unmatched rows, and link this table to another tESBProviderResponse, if there is no row matched, the tESBProviderResponse linked with reject-inner-join table will work, for more information, please see my screenshots.
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Unexpected EOF in prolog error when no output to ESBProviderResponse

Hi Shong,
The solution works partly because innerjoin reject is executed for each row rejected. So for certain cases even if there is a match, the reject response will be sent for a rejected row.
workaround: used a flag variable in globalMap in the success and and fail paths to identify and send error response only if all rows are rejected.
Thanks.
One Star

Re: Unexpected EOF in prolog error when no output to ESBProviderResponse

Is this trigger on the Component or the database?
One Star

Re: Unexpected EOF in prolog error when no output to ESBProviderResponse

Hi just an update, Unexpected EOF in prolog error is a CXF error.
In a nutshell the implementation of a service returned prematurely and there was (No response to return so a Soap fault is returned with the above error)
No much unlike a 500 internal server error in a container.
Generally this implies poor design as not all scenarios are catered for.
Thus make sure a Response component is always triggered on the path.
Dropping a tAssert > tXMLMap > tESBProviderFault is one way to catch all errors and direct them to the fault.
This may not be suitable to all jobs so searching for error handling techniques will uncover a few tutorials etc on this.
As Shong did explain above. Add an extra output in a tXMLMap and set 'capture lookup inner join' to true will fire this edge
Graham