Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JNI error occured #454

Open
5 tasks
mosses987 opened this issue Sep 5, 2019 · 1 comment
Open
5 tasks

JNI error occured #454

mosses987 opened this issue Sep 5, 2019 · 1 comment

Comments

@mosses987
Copy link

Problem Statement

package demoAlways;

import static io.restassured.RestAssured.given;

import io.restassured.RestAssured;
import io.restassured.http.ContentType;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

public class Basement {

@Test
public void test1()
	


{
		// TODO Auto-generated method stub
	
	RestAssured.baseURI = "https://maps.googleapis.com";  

	given().
	param("location","-33.8670522,151.1957362").
	param("radius","1500").
	param("key","AIzaSyCJeDXzNibskiZJ5FkebbGRmvZVnSeTBxk").
	when().
	get("/maps/api/place/nearbysearch/json").
	then().assertThat().statusCode(200).and().contentType(ContentType.JSON).and().
	body("results[0].name",equalTo("Sydney")).and().
	body("result[0].place_id", equalTo("ChIJFfyzTTeuEmsRuMxvFyNRfbk"));
	
	

}

}

A JNI error occured. Please verify the installation

Exception Error

Exception in thread "main" java.lang.NoClassDefFoundError: com/beust/jcommander/ParameterException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more

Any relate message in "Error Log" view

"Windows -> Show View -> Others -> Error Log"

The Dependency Management tool for your project

  • Maven
  • Gradle
  • Ant
  • Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)

Operating System

  • Windows
@missedone
Copy link
Collaborator

Caused by: java.lang.ClassNotFoundException: com.beust.jcommander.ParameterException

could you make sure jcommander is on your classpath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants