Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
desanip
Contributor
Contributor

Exception in component tRESTClient_1 - javax.ws.rs.BadRequestException: HTTP 400 Bad Request

Hello Talendians,

 

I have a talend job which pulls data from an api and loads into SQL Server. I am constantly running into this error message for the last few days:

 

[FATAL]: SR_Reservation_Extract - tRunJob_1 Child job returns 1. It doesn't terminate normally.
Exception in component tRESTClient_1 (SR_Reservation_API_Child)
javax.ws.rs.BadRequestException: HTTP 400 Bad Request
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:423)
at org.apache.cxf.jaxrs.client.AbstractClient.convertToWebApplicationException(AbstractClient.java:507)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:902)
at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:863)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:426)
at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:609)
at tgtimdasevenrooms.sr_reservation_api_child_0_1.SR_Reservation_API_Child.tLoop_1Process(SR_Reservation_API_Child.java:3586)
at tgtimdasevenrooms.sr_reservation_api_child_0_1.SR_Reservation_API_Child.runJobInTOS(SR_Reservation_API_Child.java:10458)

 

I know this a client error and the the server is unable to process the request sent by the client ( Could be invalid syntax) . I tested the api url with query paramaters in POSTMAN and i am seeing the request as successful. It appears there is an issue with how i am making the request in talend job

 

Can someone tell me how i can debug the issue? Any settings i need to change?

 

Thanks.

Labels (6)
3 Replies
Anonymous
Not applicable

Hi @desanip ,

 

Can you please print the whole URL, that you are generating in Talend, and then use the full URL in postman/browser and check if you are hitting the correct API.

 

Thanks and Regards,

Subhadip

desanip
Contributor
Contributor
Author

Hi @subhadip13 ,

 

Yes i did print out the full url and i was able to successfully make a request to the api url in postman. I can see the data as well.  My HTTP method is GET and Accept type is XML if i have to be more specific. 

Anonymous
Not applicable

Hi @desanip,
did you solve this problem?

thanks and regards