Hello all:
 
I'm using castor 0.9.4 to generate classes from the XSD at http://XML.FlightView.com/fvLiveryCoach/FlightViewBase.xsd
The XSD validated ok using an online validator, but when I run castor I get warnings and an exception.  I'm using the Xerces 2.2 parser and the following execution line:
 
D:\FlightView>java org.exolab.castor.builder.SourceGenerator -i FlightViewBase.xsd -dest generated
 
I'm getting a number of warnings like:
    Type not found for element: AirlineData
    Type not found for element: ScheduleData
 
followed by an IllegalArgumentException. 
 
Exception in thread "main" java.lang.IllegalArgumentException: duplicate name found: _flightId
        at org.exolab.javasource.JClass.addField(Unknown Source)
        at org.exolab.castor.builder.FieldInfo.createJavaField(Unknown Source)
        at org.exolab.castor.builder.SourceFactory.handleField(Unknown Source)
        at org.exolab.castor.builder.SourceFactory.processContentModel(Unknown Source)
        at org.exolab.castor.builder.SourceFactory.processContentModel(Unknown Source)
        at org.exolab.castor.builder.SourceFactory.processComplexType(Unknown Source)
        at org.exolab.castor.builder.SourceFactory.createSourceCode(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.createClasses(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.createClasses(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.generateSource(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.generateSource(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.generateSource(Unknown Source)
        at org.exolab.castor.builder.SourceGenerator.main(Unknown Source)
 
Suggestions or ideas appreciated,
    Ted

Reply via email to