Error while using trestclient

Five Stars

Error while using trestclient

Hi,

 

I'm trying make post request using trestclient component.

 

String inp = My Json content

 

Fixedflowcomponent

(Two columns: body and string with both of type string and value is inp from above)

|

|

tconvertType

(converted body to Document type) 

|

|

|

trestclient

 

 

Error

 

Exception in component tRESTClient_1
javax.ws.rs.ProcessingException: java.lang.IllegalArgumentException: URI is not absolute
at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(AbstractClient.java:582)
at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(AbstractClient.java:564)
at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1144)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1094)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:894)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:865)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:428)
at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:458)
at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall.tFixedFlowInput_1Process(jbPosEmailSignupCall.java:5319)
at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall.tFileList_1Process(jbPosEmailSignupCall.java:4129)
at project_salesforce.jbposemailsignupcall_0_10.jbPosEmailSignupCall$4.run(jbPosEmailSignupCall.java:13175)
Caused by: java.lang.IllegalArgumentException: URI is not absolute
at java.net.URI.toURL(URI.java:1088)
at org.apache.cxf.transport.http.Address.getURL(Address.java:60)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit.createConnection(URLConnectionHTTPConduit.java:104)
at org.apache.cxf.transport.http.URLConnectionHTTPConduit.setupConnection(URLConnectionHTTPConduit.java:117)
at org.apache.cxf.transport.http.HTTPConduit.prepare(HTTPConduit.java:497)
at org.apache.cxf.interceptor.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:46)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:649)
at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1093)
... 7 more

 

 

May I know what could be the issue here ? Because when I do from postman, it works fine.

 

Thanks

Moderator

Re: Error while using trestclient

Hello,

How did you set your URL and Relative path in your tRestClient component? Any blank space?

Would you mind posting your component setting screenshot on forum which will be helpful for us to address your issue?

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.

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog