Invoke REST API error "Activity invocation failed caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Connection reset Caused by: java.net.SocketException: Connection reset"

Invoke REST API error "Activity invocation failed caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Connection reset Caused by: java.net.SocketException: Connection reset"

book

Article ID: KB0082744

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for REST and JSON 2.0.0

Description

Sometimes customer might get following error while giving a call to REST service on Tibco ActiveMatrix BusinessWorks 5.12 and REST and JSON plug-in 2.0.0

*****
Activity invocation failed
caused by: com.sun.jersey.api.client.ClientHandlerException:
java.net.SocketException: Connection reset
Caused by: java.net.SocketException: Connection reset"
*****

This error appears mainly because of following two reasons:

1. If customer is giving a call to service which listens only TLSv1.2 calls. As they are using Tibco ActiveMatrix 5.12 which uses tibcojre 1.7 (tibcojre 1.7 use jre version 1.7), and by default jre1.7 doesn't use TLSv1.2 calls;

2. If customer is not using security vendor entrust.

 

 

Issue/Introduction

Invoke REST API error "Activity invocation failed caused by: com.sun.jersey.api.client.ClientHandlerException: java.net.SocketException: Connection reset Caused by: java.net.SocketException: Connection reset"

Environment

TIBCO ActiveMatrix BusinessWorks 5.12

Resolution

In order to overcome from above mentioned error please add following two properties inside designer.tra for design time connection and inside application.tra for runtime connection.

1. java.property.https.protocols=TLSv1.2

2. java.property.com.tibco.security.EntrustLast=true
And/OR 
java.property.TIBCO_SECURITY_VENDOR=j2se
(Note: You have to add either of any one property or you can add both at once)