Unable to generate classes from XSD using JaxB in MyEclipse

  1. MyEclipse Archived > Web Services

This topic contains 1 reply, has 2 voices, and was last updated by  support-pradeep 7 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #339783 Reply

    Ed Gutierrez
    Participant

    Having a problem trying to generate java classes using JAXB in MyEclipse Bling. I have created a WebServices project that is running with Java 1.6 runtime. It is a maven enabled with all the appropriate libaries in the build path. Also, I have schema in the project that I want to create java classes for using JAXB. When I try to generate the classes I get the following errors below. The error is encountered immediately. I made sure that the jaxb jars are in the build path and they. They are included as part of the maven build path.

    parsing a schema…
    Exception in thread “main” java.lang.NoSuchMethodError: com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>([Ljava/lang/Class;Ljava/util/Collection;Ljava/util/Map;Ljava/lang/String;ZLcom/sun/xml/bind/v2/model/annotation/RuntimeAnnotationReader;ZZ)V
    at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:332)
    at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1.<init>(AnnotationParserFactoryImpl.java:80)
    at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl.create(AnnotationParserFactoryImpl.java:79)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.createAnnotationParser(NGCCRuntimeEx.java:323)
    at com.sun.xml.xsom.impl.parser.state.annotation.action0(annotation.java:48)
    at com.sun.xml.xsom.impl.parser.state.annotation.enterElement(annotation.java:73)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:294)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:111)
    at com.sun.xml.xsom.impl.parser.state.foreignAttributes.enterElement(foreignAttributes.java:50)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:200)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:250)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:238)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:222)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:258)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
    at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:270)
    at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:219)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:104)
    at com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:144)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:113)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:188)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.tools.xjc.ModelLoader$SpeculationChecker.startElement(ModelLoader.java:455)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:98)
    at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
    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:807)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
    at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
    at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:79)
    at com.sun.tools.xjc.ModelLoader$2.parse(ModelLoader.java:479)
    at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:262)
    at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:301)
    at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:88)
    at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:147)
    at com.sun.tools.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:496)
    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)

    #339811 Reply

    edguts,

    Sorry that you are seeing this issue.

    Can you please answer some more questions to help us investigate further :
    1) Can you please share your installation details from MyEclipse > Installation summary > Installation details ?
    2) Can you please mention which Webservice framework you used for creating a webservice project ?
    3) If possible, can you please attach the sample schema (.xsd file) here which exhibits this issue to help us investigate further.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Unable to generate classes from XSD using JaxB in MyEclipse

You must be logged in to post in the forum log in