tREST Client component throws RedirectionException: HTTP 302 Found

Symptom

When any third party API is used to fetch data and tries to interact with webservice providers (in the following stack trace, it is Zuora API), the following exception can occur:

Exception in component tRESTClient_1 (ZuoraConnection)
javax.ws.rs.RedirectionException: HTTP 302 Found
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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 local_project.zuoraconnection_0_1.ZuoraConnection.tRESTClient_1Process(ZuoraConnection.java:865)
at local_project.zuoraconnection_0_1.ZuoraConnection.runJobInTOS(ZuoraConnection.java:1307)
at local_project.zuoraconnection_0_1.ZuoraConnection.main(ZuoraConnection.java:1133)
[statistics] disconnected

 

Solution

The HTTP 302 Status code is the most common way of performing redirection. Generally, the 302 status code indicates that the resource you are requesting has redirected to another resource.

 

Resolve this by enabling the Use HTTP Proxy setting, available on the Advanced Settings tab of the tRestClient component.

Version history
Revision #:
3 of 3
Last update:
‎10-30-2017 05:13 PM
Updated by:
 
Contributors