[resolved] error with tRESTClient component

One Star

[resolved] error with tRESTClient component

Hi
I am trying to POST (Update/insert) records from JSON format through t_RESTClient.please help me to find the root cause of the error.
using talend DM 5.5.1 enterprise
log message :
Checking ports...
Sending job 'XXXXXXXXXXXXXXXXXXXXX' to server (10.0.100.119:8001)...
File transfer completed.
Deploying job 'XXXXXXXXXXXXXXXXXXXXX' on server (192.1.170.2399:8000)...
Running job 'XXXXXXXXXXXXXXXXXXXXX'...
Starting job XXXXXXXXXXXXXXXXXXXXX at 13:56 11/08/2015.
connecting to socket on port 3598
connected
log4j:WARN No appenders could be found for logger (org.apache.cxf.common.logging.LogUtils).
log4j:WARN Please initialize the log4j system properly.
disconnected
Exception in component tRESTClient_2
javax.ws.rs.NotFoundException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:463)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:881)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:410)
at org.apache.cxf.jaxrs.client.WebClient.put(WebClient.java:474)
Job XXXXXXXXXXXXXXXXXXXXX ended at 14:07 11/08/2015.
Seventeen Stars

Re: [resolved] error with tRESTClient component

does this job can run in your studio directly without sending it to a job server?
One Star

Re: [resolved] error with tRESTClient component

Thanks for the response.
No,Its not.
I tried same component in different for testing purpose.
Starting job json at 08:45 12/08/2015.
connecting to socket on port 3407
connected
C:/Talend/TalendConfig/LMUEXP.config (No such file or directory)
Aug 12, 2015 8:45:04 AM org.apache.cxf.interceptor.LoggingOutInterceptor
INFO: Outbound Message
---------------------------
ID: 1
Address:
Http-Method: PUT
Content-Type: application/json
Headers: {Content-Type=, Accept=}
--------------------------------------
Aug 12, 2015 8:45:05 AM org.apache.cxf.interceptor.LoggingInInterceptor
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 411
Encoding: ISO-8859-1
Content-Type: text/html
Headers: {connection=, Content-Length=, content-type=, Date=, Server=}
Payload: <html>
<head><title>411 Length Required</title></head>
<body bgcolor="white">
<center><h1>411 Length Required</h1></center>
<hr><center>nginx/0.8.54</center>
</body>
</html>
--------------------------------------
Exception in component tRESTClient_3
javax.ws.rs.ClientErrorException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:463)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:881)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:852)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:410)
at org.apache.cxf.jaxrs.client.WebClient.put(WebClient.java:474)
at lmuexp.json_0_1.json.tRESTClient_3Process(json.java:973)
at lmuexp.json_0_1.json.runJobInTOS(json.java:1245)
at lmuexp.json_0_1.json.main(json.java:1091)
disconnected
Job json ended at 08:45 12/08/2015.
Seventeen Stars

Re: [resolved] error with tRESTClient component

It looks like you send not payload and also no length information (should be part of the header).
Please show us your job design.
One Star

Re: [resolved] error with tRESTClient component

I have attached screenshots.
One Star

Re: [resolved] error with tRESTClient component

Attachments
job.zip.zip
One Star

Re: [resolved] error with tRESTClient component

found the problem and the issue is resolved.
Thank you jlolling.
One Star

Re: [resolved] error with tRESTClient component

Hi
Could you describe how you solved it? I might have the same problem...
Best regards, Lise
One Star

Re: [resolved] error with tRESTClient component

found the problem and the issue is resolved.
Thank you jlolling.

Hi ,
Can you please tell me how did you resolve this issue. i get the same error for one of my job when i try to send payload to a rest API.
Thanks,
swathi
One Star

Re: [resolved] error with tRESTClient component

found the problem and the issue is resolved.
Thank you jlolling.

Hi ,
Can you please tell me how did you resolve this issue. i get the same error for one of my job when i try to send payload to a rest API.
Thanks,
swathi
Hi @gaddenc 
 Can you please tell me how did you resolve this issue!
Same Error!
Thanks! Ezequiel