Unable to trigger calls to another Virtual Service through the VSM
search cancel

Unable to trigger calls to another Virtual Service through the VSM

book

Article ID: 419579

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

We have an error occurring in the VSM where if we make an external API call using the java.net.HttpURLConnection and java.net.URL class it will throw the error which wasn't present in 10.7.2.

We had another Broadcom case opened for a similar issue which was present in the VSI match script for which the solution below which fixed the issue in the VSI.

1. apply the patch patch_DE646815_10.8.4_GA.jar

2. add the property to the vm options file 1)(--add-opens=java.base/sun.net.www.protocol.https=ALL-UNNAMED)

 


Error message: 

| Message:     bsh.EvalError: Sourced file: inline evaluation of: ``import com.itko.lisa.vse.stateful.model.Request;  import com.itko.util.Parameter . . . '' : Error in method invocation: Cannot access method setRequestMethod( java.lang.String ) in 'class sun.net.www.protocol.http.HttpURLConnection' :java.lang.IllegalAccessException: class bsh.Reflect cannot access class sun.net.www.protocol.http.HttpURLConnection (in module java.base) because module java.base does not export sun.net.www.protocol.http to unnamed module @5f683daf : at Line: 115 : in file: inline evaluation of: ``import com.itko.lisa.vse.stateful.model.Request;  import com.itko.util.Parameter . . . '' : conn .setRequestMethod ( "GET" ) 
 in inline evaluation of: ``import com.itko.lisa.vse.stateful.model.Request;  import com.itko.util.Parameter . . . '' at line number 115

Environment

All supported DevTest releases.

Resolution

Added the new property to Workstation and all VSE vmoptions files:

--add-opens=java.base/sun.net.www.protocol.http=ALL-UNNAMED

Restarted the Utility VSE where the service is hosted, and tested in ITR and on VSE.

This resolved the issue.