JDK 11,JAXB-Jars 2.X,产生Classess错误

时间:2019-07-06 19:36:54

标签: jaxb

Eclipse Photon,

新的JAXB项目 添加了所有罐子[jaxb] JDK是11 指向JDK 11的项目 JAX B降级到2.1

当我尝试使用XSD生成下面的Java类时,就是错误

解析模式... 线程“主”中的异常java.lang.NoSuchMethodError:com.sun.xml.bind.v2.runtime.JAXBContextImpl。([[Ljava / lang / Class; Ljava / util / Collection; Ljava / util / Map; Ljava / lang /字符串; ZLcom / sun / xml / bind / v2 / model / annotation / RuntimeAnnotationReader; ZZ)V     在com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:332)     在com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl $ 1。(AnnotationParserFactoryImpl.java:80)     在com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl.create(AnnotationParserFactoryImpl.java:79)     在com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.createAnnotationParser(NGCCRuntimeEx.java:323)     在com.sun.xml.xsom.impl.parser.state.annotation.action0(annotation.java:48)     在com.sun.xml.xsom.impl.parser.state.annotation.enterElement(annotation.java:73)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:111)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:198)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:127)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:242)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:92)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:174)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:186)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:139)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:234)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:257)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:111)     在com.sun.xml.xsom.impl.parser.state.foreignAttributes.enterElement(foreignAttributes.java:50)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)     在com.sun.xml.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:159)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)     在com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)     在com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:211)     在com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:219)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:104)     在com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:144)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:113)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:188)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在com.sun.tools.xjc.ModelLoader $ SpeculationChecker.startElement(ModelLoader.java:455)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:98)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)     在java.xml / com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)     在java.xml / com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)     在java.xml / com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl $ FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2708)     在java.xml / com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)     在java.xml / com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)     在java.xml / com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:534)     在java.xml / com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:888)     在java.xml / com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)     在java.xml / com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)     在java.xml / com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)     在java.xml / com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl $ JAXPSAXParser.parse(SAXParserImpl.java:635)     在java.xml / org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)     在com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:79)     在com.sun.tools.xjc.ModelLoader $ 2.parse(ModelLoader.java:479)     在com.sun.tools.xjc.ModelLoader $ XMLSchemaParser.parse(ModelLoader.java:262)     在com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:301)     在com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:88)     在com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:147)     在com.sun.tools.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:496)     在com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:366)     在com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167)     在com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)     在com.sun.tools.xjc.Driver.run(Driver.java:313)     在com.sun.tools.xjc.Driver.run(Driver.java:191)     在com.sun.tools.xjc.Driver._main(Driver.java:116)     at com.sun.tools.xjc.Driver.access $ 000(Driver.java:74)     在com.sun.tools.xjc.Driver $ 1.run(Driver.java:96)

尝试过的项目方面 尝试过CFX-XJX罐 其他版本的JAXB [impl,core,xml-bind]

项目与生成Java类有关

0 个答案:

没有答案