无法从jasperreport.xsd生成jaxb类

时间:2015-11-04 09:26:04

标签: java jaxb jasper-reports

我尝试从jasperreport.xsd生成jaxb类但是我得到了这个异常

Exception in thread "main" java.lang.AssertionError: javax.xml.bind.JAXBException
 - with linked exception:
[com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
com.sun.xml.internal.bind.api.impl.NameConverter est une interface et JAXB ne peut pas gérer les interfaces.
    this problem is related to the following location:
        at com.sun.xml.internal.bind.api.impl.NameConverter
        at public com.sun.xml.internal.bind.api.impl.NameConverter com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding.nameConverter
        at com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BIGlobalBinding
]
    at com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo.getCustomizationContext(BindInfo.java:341)
    at com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.BindInfo.getCustomizationUnmarshaller(BindInfo.java:347)
    at com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1.<init>(AnnotationParserFactoryImpl.java:70)
    at com.sun.tools.internal.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl.create(AnnotationParserFactoryImpl.java:69)
    at com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx.createAnnotationParser(NGCCRuntimeEx.java:350)
    at com.sun.xml.internal.xsom.impl.parser.state.annotation.action0(annotation.java:74)
    at com.sun.xml.internal.xsom.impl.parser.state.annotation.enterElement(annotation.java:99)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:99)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:173)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:271)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:118)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:185)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:165)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:130)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:153)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:283)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:212)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:200)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:136)
    at com.sun.xml.internal.xsom.impl.parser.state.foreignAttributes.enterElement(foreignAttributes.java:76)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:99)
    at com.sun.xml.internal.xsom.impl.parser.state.elementDeclBody.enterElement(elementDeclBody.java:220)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:403)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:99)
    at com.sun.xml.internal.xsom.impl.parser.state.Schema.enterElement(Schema.java:376)
    at com.sun.xml.internal.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:244)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.tools.internal.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:93)
    at com.sun.tools.internal.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:135)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.tools.internal.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:113)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.tools.internal.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:178)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.tools.internal.xjc.ModelLoader$SpeculationChecker.startElement(ModelLoader.java:458)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.tools.internal.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:88)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:551)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:509)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:380)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2787)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:357)
    at com.sun.xml.internal.xsom.parser.JAXPParser.parse(JAXPParser.java:85)
    at com.sun.tools.internal.xjc.ModelLoader$2.parse(ModelLoader.java:482)
    at com.sun.tools.internal.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:254)
    at com.sun.xml.internal.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:332)
    at com.sun.xml.internal.xsom.impl.parser.ParserContext.parse(ParserContext.java:113)
    at com.sun.xml.internal.xsom.parser.XSOMParser.parse(XSOMParser.java:156)
    at com.sun.tools.internal.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:499)
    at com.sun.tools.internal.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:354)
    at com.sun.tools.internal.xjc.ModelLoader.load(ModelLoader.java:159)
    at com.sun.tools.internal.xjc.ModelLoader.load(ModelLoader.java:104)
    at com.sun.tools.internal.xjc.Driver.run(Driver.java:318)
    at com.sun.tools.internal.xjc.Driver.run(Driver.java:185)
    at com.sun.tools.internal.xjc.Driver._main(Driver.java:108)
    at com.sun.tools.internal.xjc.Driver.access$000(Driver.java:65)
    at com.sun.tools.internal.xjc.Driver$1.run(Driver.java:88)
Caused by: javax.xml.bind.JAXBException

0 个答案:

没有答案