One Star

Unexpected EOF in prolog error with tRESTclient

I have created a simple job using the tRESTclient to call a RESTful service from OpenL Tablets. The job appears to execute and does call the OpenL service, but the following message is displayed in the error flow to tLogRow:
Starting job OpenL_Test at 14:20 08/04/2015.

connecting to socket on port 3633
connected
400|WebApplicationException has been caught, status: 400, message: Unexpected EOF in prolog
 at :
disconnected
Job OpenL_Test ended at 14:20 08/04/2015.

I checked the log file for the REST service and see the following error message:
14:20:15,728  WARN  (org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper.java:73) - javax.ws.rs.BadRequestException: HTTP 400 Bad Request

I am not sure if the issue is caused by how the tRESTclient formats the service request. (I can't see what the actual request looks like.)
Has anyone else seen a similar "Unexpected EOF in prolog" error with the tRESTclient? If so, I'd like to know how you fixed the issue. Thank you.
Environment Notes
-------------------

OS: OS X 10.0.2
Talend Open Studio v5.3.2
OpenL Tablets Web Services 5.14.0
Apache Tomcat v.8.0.20
Java 1.7.0_60
3 REPLIES
Moderator

Re: Unexpected EOF in prolog error with tRESTclient

Hi,
Can you take a try to use tREST instead of tRESTClient to see if it is working?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Unexpected EOF in prolog error with tRESTclient

Hello,
I tried tREST and using the POST method, I get an HTTP 415 error. tLog shows:
Starting job OpenL_Test at 15:45 08/04/2015.
 connecting to socket on port 3555
connected
|415
disconnected
Job OpenL_Test ended at 15:45 08/04/2015.

The Tomcat log shows:
15:45:45,297  WARN  (org.apache.cxf.jaxrs.utils.JAXRSUtils.java:522) - No operation matching request path "/openl-tablets-ws-5.14.0/REST/openl_tomcat_8/bmcg/Greeting1" is found, Relative Path: /Greeting1, HTTP Method: POST, ContentType: text/plain, Accept: text/html,image/gif,image/jpeg,*/*;q=.2,*/*;q=.2,. Please enable FINE/TRACE log level for more details.
15:45:45,299 WARN  (org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper.java:73) - javax.ws.rs.ClientErrorException: HTTP 415 Unsupported Media Type

After that I decided to try an HTTP PUT (instead of POST) to see what happens.  tLog shows an HTTP 405 error:
Starting job OpenL_Test at 15:47 08/04/2015.

connecting to socket on port 3425
connected
|405
disconnected
Job OpenL_Test ended at 15:47 08/04/2015.

and the Tomcat log shows:
15:47:44,736  WARN  (org.apache.cxf.jaxrs.utils.JAXRSUtils.java:522) - No operation matching request path "/openl-tablets-ws-5.14.0/REST/openl_tomcat_8/bmcg/Greeting1" is found, Relative Path: /Greeting1, HTTP Method: PUT, ContentType: text/plain, Accept: text/html,image/gif,image/jpeg,*/*;q=.2,*/*;q=.2,. Please enable FINE/TRACE log level for more details.
15:47:44,737 WARN  (org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper.java:73) - javax.ws.rs.ClientErrorException: HTTP 405 Method Not Allowed

I am not sure if "javax.ws.rs.ClientErrorException: HTTP 415 Unsupported Media Type" exception is thrown because of a configuration error with tREST component or if there is an issue with the way the OpenL web service implements the javax lib. 
 
Seventeen Stars

Re: Unexpected EOF in prolog error with tRESTclient

hi,
look like Path is not found first
 No operation matching request path

And Content type not supported
Relative Path: /Greeting1, HTTP Method: PUT, ContentType: text/plain,

Did you put json or xml has content-type ??
did you try to request with a solution like soaui & check rest request ? (outside Talend)
regards