1

在执行下面的代码时

import com.github.fge.jsonschema.main.JsonSchemaFactory;

JsonSchemaFactory factory = JsonSchemaFactory.byDefault();

我得到以下错误。

]] Root cause of ServletException.
java.lang.NoSuchMethodError: org.joda.time.format.DateTimeFormatterBuilder.appendFixedDecimal(Lorg/joda/time/
DateTimeFieldType;I)Lorg/joda/time/format/DateTimeFormatterBuilder;
        at com.github.fge.jsonschema.format.common.DateTimeAttribute.<clinit>(DateTimeAttribute.java:56)
        at com.github.fge.jsonschema.library.format.CommonFormatAttributesDictionary.<clinit>(CommonFormatAttributesDictionary.java:52)
        at com.github.fge.jsonschema.library.format.DraftV3FormatAttributesDictionary.<clinit>(DraftV3FormatAttributesDictionary.java:47)
        at com.github.fge.jsonschema.library.DraftV3Library.<clinit>(DraftV3Library.java:32)
        at com.github.fge.jsonschema.cfg.ValidationConfigurationBuilder.<clinit>(ValidationConfigurationBuilder.java:63)
        Truncated. see log file for complete stacktrace

使用的maven依赖如下。

    <dependency>
        <groupId>com.github.fge</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>2.2.6</version>
    </dependency>

有人可以帮我弄清楚可能出了什么问题吗?

4

0 回答 0