I am getting below error while using rest assured(3.0.0) code with java 16 while for java 1.8 same code is working fine.

"java.lang.ExceptionInInitializerError" " groovy.lang.MissingMethodException: No signature of method: static org.apache.http.conn.ssl.X509HostnameVerifier.getSimpleName() is applicable for argument types: () values: []

Need to resolve this exception

2

There are 2 best solutions below

0
Sonika K On

Fixed using below solution from - https://github.com/rest-assured/rest-assured/issues/923

<dependency>
  <groupId>io.rest-assured</groupId>
  <artifactId>rest-assured</artifactId>
  <version>3.0.5</version>
  <scope>test</scope>
</dependency>

I've fixed it by adding this one:

<dependency>
    <groupId>org.codehaus.groovy</groupId>
    <artifactId>groovy-all</artifactId>
    <version>2.4.11</version>
</dependency>
0
Manova On

i faced same issue and i resolved by updating the rest assured to 5.2.0 dependecy to latest version