Multiple json jar files in Devtest
search cancel

Multiple json jar files in Devtest

book

Article ID: 253632

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

    I recently ran into a problem with the how the Workstation load jar files vs the VSE. the Workstation appears to load the latest version but the VSE loads the earliest of the same class. Also, the Workstation chosose to load from "lib" but the VSE loads from "lib/shared". see below for class "org.json.JSONObject"

Workstation loads from: file:/C:/Apps/CA/DevTest/lib/json-20180130.jar!/org/json/JSONObject.class

VSE loads from: file:/opt/CA/DevTest/lib/shared/json-20140107.jar!/org/json/JSONObject.class

This breaks my code as it needs method org.json.JSONObject.toMap() which only available in "json-20180130.jar".

I am getting error: "Target exception: java.lang.NoSuchMethodError: org.json.JSONObject.toMap()"

if I remove the file "json-20140107.jar" from the VSE server (in lib/shared), does it cause adverse effects to how the VSE behaves/works? 

Environment

Release : 10.6, 10.7

Resolution

Take backup of json-20140107.jar and remove from lib\shared folder and restart the component to use the  json-20180130.jar file.