users@jaxb.java.net

Re: IllegalArgumentException

From: Riddile Spencer <riddile_spencer_at_BAH.COM>
Date: Mon, 04 Nov 2002 14:48:10 -0500

Ed,

Thanks for your reply. The schema I'm using is large and its final
structure is still being decided. It would be great if there were a way
to debug where in the schema JAXB is having problems. Attached is the
schema I used. Thanks again.

Spencer

Ed Mooney wrote:
>
> If you're trying to compile one of our samples, please advise which one.
> If not, please send along the schema you're trying to compile.
>
> Regards,
> --
> Ed Mooney |Sun Microsystems, Inc.|Time flies like
> Java Web Services |UBUR02-201 |an arrow, but
> Ed.Mooney_at_Sun.COM |1 Network Drive |fruit flies like
> 781-442-0459 |Burlington, MA 01803 |a banana. Groucho
>
> srbah wrote:
> > When generating JAXB classes from a XML schema, I received an java.lang.IllegalArgumentException. Can someone tell me how I could debug this exception? Thanks.
> >
> > BUILD FAILED
> > java.lang.IllegalArgumentException
> > at com.sun.xml.xsom.impl.ElementDecl.<init>(ElementDecl.java:40)
> > at com.sun.xml.xsom.impl.parser.state.elementDeclBody.makeResult(element
> > DeclBody.java:615)
> > at com.sun.xml.xsom.impl.parser.state.elementDeclBody.text(elementDeclBody.java:402)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.revertToParentFromText
> > (NGCCRuntime.java:503)
> > at com.sun.xml.xsom.impl.parser.state.annotation.text(annotation.java:12
> > 0)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.processPendingText(NGC
> > CRuntime.java:188)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime
> > .java:248)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.iso_relax.verifier.impl.VerifierFilterImpl.endElement(Unknown Sou
> > rce)
> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
> > ser.java:585)
> > at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespa
> > ceBinder.java:898)
> > at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBind
> > er.java:644)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
> > XMLDocumentFragmentScannerImpl.java:1008)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> > Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
> > LDocumentFragmentScannerImpl.java:329)
> > at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> > a:525)
> > at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> > a:581)
> > at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> > at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
> > ava:1175)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.
> > java:151)
> > at com.sun.xml.xsom.impl.parser.XSOMParser.parse(XSOMParser.java:116)
> > at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:511)
> > at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
> > at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:149)
> > at org.apache.tools.ant.Task.perform(Task.java:317)
> > at org.apache.tools.ant.Target.execute(Target.java:309)
> > at org.apache.tools.ant.Target.performTasks(Target.java:334)
> > at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> > at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> > at org.apache.tools.ant.Main.runBuild(Main.java:610)
> > at org.apache.tools.ant.Main.start(Main.java:196)
> > at org.apache.tools.ant.Main.main(Main.java:235)
> >
> > Total time: 9 seconds
> > java.lang.IllegalArgumentException
> > at com.sun.xml.xsom.impl.ElementDecl.<init>(ElementDecl.java:40)
> > at com.sun.xml.xsom.impl.parser.state.elementDeclBody.makeResult(element
> > DeclBody.java:615)
> > at com.sun.xml.xsom.impl.parser.state.elementDeclBody.text(elementDeclBo
> > dy.java:402)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.revertToParentFromText
> > (NGCCRuntime.java:503)
> > at com.sun.xml.xsom.impl.parser.state.annotation.text(annotation.java:12
> > 0)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.processPendingText(NGC
> > CRuntime.java:188)
> > at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.endElement(NGCCRuntime
> > .java:248)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.endElement(Unknown Source)
> > at org.iso_relax.verifier.impl.VerifierFilterImpl.endElement(Unknown Sou
> > rce)
> > at org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXPar
> > ser.java:585)
> > at org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespa
> > ceBinder.java:898)
> > at org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBind
> > er.java:644)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
> > XMLDocumentFragmentScannerImpl.java:1008)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
> > Dispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1469)
> > at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XM
> > LDocumentFragmentScannerImpl.java:329)
> > at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> > a:525)
> > at org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.jav
> > a:581)
> > at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
> > at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
> > ava:1175)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at org.xml.sax.helpers.XMLFilterImpl.parse(Unknown Source)
> > at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.
> > java:151)
> > at com.sun.xml.xsom.impl.parser.XSOMParser.parse(XSOMParser.java:116)
> > at com.sun.tools.xjc.Driver.loadXMLSchemaGrammar(Driver.java:511)
> > at com.sun.tools.xjc.Driver.loadGrammar(Driver.java:404)
> > at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:149)
> > at org.apache.tools.ant.Task.perform(Task.java:317)
> > at org.apache.tools.ant.Target.execute(Target.java:309)
> > at org.apache.tools.ant.Target.performTasks(Target.java:334)
> > at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> > at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
> > at org.apache.tools.ant.Main.runBuild(Main.java:610)
> > at org.apache.tools.ant.Main.start(Main.java:196)
> > at org.apache.tools.ant.Main.main(Main.java:235)