Hi Ned, When you did your update did you recompile everything? I added some new types to the class "org.exolab.castor.xml.schema.Structure", which causes some of numbers for the Stucture types to change. I suggest doing a complete recompile of Castor and it should fix the problem. If it doesn't fix the problem, please include the surrounding parts of the Schema that contain the complex type definition. Thanks, --Keith Ned Wolpert wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Folks- > > Is this a bug or the 'correct' behavior? The following schema design was > valid earier this week, but failed when I did a cvs update this morning. > > Here's the schema snippet: > > <xsd:complexType name='Address'> > <xsd:sequence> > <xsd:element ref = 'StreetAddress1' minOccurs='1' maxOccurs='1'/> > <xsd:element ref = 'StreetAddress2' minOccurs = '0'/> > <xsd:element ref = 'City' minOccurs='1' maxOccurs='1'/> > <xsd:element ref = 'State' minOccurs='1' maxOccurs='1'/> > <xsd:element ref = 'Zip' minOccurs='1' maxOccurs='1'/> > <xsd:element ref = 'Country' minOccurs = '0'/> > <xsd:element ref = 'Phone' minOccurs='0' maxOccurs='unbounded'/> > </xsd:sequence>> > </xsd:complexType> > <xsd:element name ='WorkAddress' type='Address'/> > <xsd:element name ='HomeAddress' type='Address'/> > > And now this produces the following error: > > java.lang.IllegalArgumentException: Invalid parent for ComplexType > at org.exolab.castor.xml.schema.ComplexType.setParent(ComplexType.java:575) > at org.exolab.castor.xml.schema.Schema.addComplexType(Schema.java:349) > at > org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.endElement(SchemaUnmars > haller.java:473) > at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1392) > at > org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.j > ava:1550) > at > org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLD > ocumentScanner.java:1149) > at > org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.ja > va:381) > at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) > at > org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java: > 388) > at > org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java: > 441) > at org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:668) > > Is this not a valid markup? > > Thanks. > > Virtually, > Ned Wolpert <[EMAIL PROTECTED]> > > D08C2F45: 28E7 56CB 58AC C622 5A51 3C42 8B2B 2739 D08C 2F45 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE8B8DsiysnOdCML0URAviTAJ9NJhjkYvGsC0Nuxjlk6xbUEe2xUQCdHIUJ > 2aOmnLSjPcNXmKZ487j4QrA= > =RhfU > -----END PGP SIGNATURE----- > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
