I wish to generate classes for jdo-configurations and mappings in order 
to un/marshall the database.xml and mapping.xml in a servlet app, and 
hence edit them using JSPs for convenience.

However, the source generator cannot generate classes for either schema.

Has anyone tried this before? Is it intended that the xsds in the schema 
folder of the CVS version of Castor-0.93 (from 1-2 weeks ago) should be 
able to be used with source generator?

In case this is a problem, I have included the stack traces below.

Thanks everyone.

// trying to generate source from jdo-conf.xsd.

patrick@bongo:~/programming/castor/src/schema$ java 
org.exolab.castor.builder.SourceGenerator -i jdo-conf.xsd -package com.xyz
org.xml.sax.SAXException: The following namespace 
"http://www.w3.org/1999/XMLSchema"; is no longer supported. Please update 
to  W3C XML Schema
Recommendation.
    line: 17
         at 
org.exolab.castor.xml.schema.reader.SaxUnmarshaller.error(SaxUnmarshaller.java:169)
         at 
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.handleXMLNS(SchemaUnmarshaller.java:232)
         at 
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.processNamespaces(SchemaUnmarshaller.java:248)
         at 
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:272)
         at 
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
         at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
         at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
         at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1005)
         at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
         at 
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:384)
         at 
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:437)
         at 
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:664)


// trying generate source from mapping.xsd

patrick@bongo:~/programming/castor/src/schema$ java 
org.exolab.castor.builder.SourceGenerator -i mapping.xsd -package com.xyz
java.lang.IllegalArgumentException: getSimpleType: the simple type 
'string' has not been declared in XML Schema namespace.
         at 
org.exolab.castor.xml.schema.Schema.getSimpleType(Schema.java:696)
         at org.exolab.castor.xml.schema.Schema.getType(Schema.java:969)
         at 
org.exolab.castor.xml.schema.reader.SimpleTypeRestrictionUnmarshaller.<init>(SimpleTypeRestrictionUnmarshaller.java:113)
         at 
org.exolab.castor.xml.schema.reader.SimpleTypeUnmarshaller.startElement(SimpleTypeUnmarshaller.java:186)
         at 
org.exolab.castor.xml.schema.reader.AttributeUnmarshaller.startElement(AttributeUnmarshaller.java:198)
         at 
org.exolab.castor.xml.schema.reader.ComplexTypeUnmarshaller.startElement(ComplexTypeUnmarshaller.java:201)
         at 
org.exolab.castor.xml.schema.reader.ElementUnmarshaller.startElement(ElementUnmarshaller.java:233)
         at 
org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.startElement(SchemaUnmarshaller.java:305)
         at 
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
         at 
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidator.java:1197)
         at 
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanner.java:1862)
         at 
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1238)
         at 
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1035)
         at 
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:384)
         at 
org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:437)
         at 
org.exolab.castor.builder.SourceGenerator.main(SourceGenerator.java:664)

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to