I'm receiving the following error while casting
Caused by: java.util.concurrent.ExecutionException: java.lang.ClassCastException: org.json.JSONObject cannot be cast to NCRB_GUIs.DeviceGroupManager.FetcherForms.Serializable_JSONObject
My Serializable_JSONObject is defined as:
import java.io.Serializable;
import org.json.JSONObject;
public class Serializable_JSONObject extends JSONObject implements Serializable{}
I am unsure why I am getting this error. Here is the code where the exception is thrown...
@Override
public ReturnInterface<Serializable_JSONObject> call() throws Exception {
CredentialInterface ci = (CredentialInterface) this.taskDeployInterface;
JSONObject READ_NO_VALIDATION = WebGet.READ_NO_VALIDATION(ci.getUser(), ci.getPassword(), new URL(ci.getHost()));
Serializable_JSONObject o = (Serializable_JSONObject) READ_NO_VALIDATION;//Error thrown here
this.returnItem = o;
return this;
}