'Getting java.lang.SecurityException - "org.hamcrest.Matchers"'s signer information does not match
I am executing below Rest Assured Program:
io.restassured.RestAssured.baseURI ="http://a.b.c.d:9200/e/f";
Response responseNew=null;
request = RestAssured.given();
JSONObject requestparams = new JSONObject();
//Setting params
requestparams.put("field", "1");
request.body(requestparams.toJSONString());
//Submitting Request
responseNew= request.when().contentType(ContentType.JSON).accept(ContentType.JSON)
.body(inputObject).when().post("/path");
//Status Code Check
responseNew.then().assertThat().statusCode(200);
I am getting below Error at the line where Status code is verified,
Exception in thread "main" java.lang.SecurityException: class "org.hamcrest.Matchers"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|