Java 如何解决JsonSchemaValidator的问题?

Java 如何解决JsonSchemaValidator的问题?,java,json,rest-assured,json-schema-validator,Java,Json,Rest Assured,Json Schema Validator,无法使用JsonSchemaValidator。请帮助解决此错误。或者可能是图书馆的错误? 我的测试代码: Response resp = given().cookie(cookie).when().get(getEndpointLink("link_menuItems")); resp.then().assertThat().body(matchesJsonSchemaInClasspath("jsonSchema.json")); 依赖项: compile group: 'io.rest-

无法使用JsonSchemaValidator。请帮助解决此错误。或者可能是图书馆的错误? 我的测试代码:

Response resp = given().cookie(cookie).when().get(getEndpointLink("link_menuItems"));
resp.then().assertThat().body(matchesJsonSchemaInClasspath("jsonSchema.json"));
依赖项:

compile group: 'io.rest-assured', name: 'json-schema-validator', version: '4.1.2'
compile group: 'com.github.fge', name: 'json-schema-core', version: '1.2.5'
compile group: 'com.github.fge', name: 'json-schema-validator', version: '2.2.6'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.0'
compile group: 'com.github.fge', name: 'jackson-coreutils', version: '1.8'
错误:

java.lang.IncompatibleClassChangeError: Found class com.github.fge.jsonschema.main.JsonSchema, but interface was expected

请检查库路径中是否存在json-schema-validator-2.2.8.jar。在2.2.8版本中,他们将JsonSchema类转换为接口