java.util.ServiceConfigurationError:com.sun.tools.xjc.Plugin:Provider org.eclipse.persistence.jaxb.plugins.BeanValidationPlugin not a subtype

时间:2017-03-17 13:51:37

标签: java eclipse jaxb

我正在尝试基于xsd生成类并收到错误。 这是堆栈错误跟踪,任何想法?

parsing a schema...
Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider org.eclipse.persistence.jaxb.plugins.BeanValidationPlugin not a subtype
    at java.util.ServiceLoader.fail(ServiceLoader.java:231)
    at java.util.ServiceLoader.access$300(ServiceLoader.java:181)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:369)
    at java.util.ServiceLoader$1.next(ServiceLoader.java:445)
    at com.sun.tools.xjc.Options.findServices(Options.java:910)
    at com.sun.tools.xjc.Options.getAllPlugins(Options.java:351)
    at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.<init>(AbstractExtensionBindingChecker.java:94)
    at com.sun.tools.xjc.reader.ExtensionBindingChecker.<init>(ExtensionBindingChecker.java:77)
    at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:257)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337)
    at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:124)
    at com.sun.xml.xsom.impl.parser.ParserContext.<init>(ParserContext.java:96)
    at com.sun.xml.xsom.parser.XSOMParser.<init>(XSOMParser.java:125)
    at com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:420)
    at com.sun.tools.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:492)
    at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:366)
    at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167)
    at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)
    at com.sun.tools.xjc.Driver.run(Driver.java:313)
    at com.sun.tools.xjc.Driver.run(Driver.java:191)
    at com.sun.tools.xjc.Driver._main(Driver.java:116)
    at com.sun.tools.xjc.Driver.access$000(Driver.java:74)
    at com.sun.tools.xjc.Driver$1.run(Driver.java:96)

1 个答案:

答案 0 :(得分:1)

您的EclipseLink / MOXy版本与您的jaxb版本不兼容