Exception while running CodeGen: Exception in thread "main" 
org.jibx.runtime.JiBXException: Expected 
"{http://www.w3.org/2001/XMLSchema}schema"; end tag, found 
"{http://www.w3.org/2001/XMLSchema}redefine"; start tag (line 3, col 69, in 
GbCaseSchema.xsd)
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: JIBX-444
                 URL: http://jira.codehaus.org/browse/JIBX-444
             Project: JiBX
          Issue Type: Bug
          Components: CodeGen
    Affects Versions: JiBX 1.2.3
         Environment: Windows XP SP3, IBM Rational Software Architect 7.0.0.10
            Reporter: Armin Kenel


Running the following ant script (part of it shown):
  <echo message="Running code generation from schema"/>
    <java classname="org.jibx.schema.codegen.CodeGen" fork="yes"
       classpathref="classpath" failonerror="true">
     <arg value="-t"/>
     <arg value="src"/>
     <arg 
value="C:/$user/workspaces/workspace_gbcadastre_TRUNK_WAS/AKE/dto/gbcase/schema/*.xsd"/>
   </java>

The following exception will occure:
Buildfile: W:\workspace_gbcadastre_TRUNK_WAS\AKE\gen.xml
codegen:
     [echo] Running code generation from schema
     [java] Exception in thread "main" org.jibx.runtime.JiBXException: Expected 
"{http://www.w3.org/2001/XMLSchema}schema"; end tag, found 
"{http://www.w3.org/2001/XMLSchema}redefine"; start tag (line 3, col 69, in 
GbCaseSchema.xsd)
     [java] at 
org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag(UnmarshallingContext.java:731)
     [java] at 
org.jibx.schema.elements.JiBX_schema_xsprefix_bindingSchemaElement_access.unmarshal()
     [java] at 
org.jibx.schema.elements.SchemaElement.unmarshal(SchemaElement.java)
     [java] at 
org.jibx.schema.validation.ValidationUtils.load(ValidationUtils.java:130)
     [java] at org.jibx.schema.codegen.CodeGen.generate(CodeGen.java:1710)
     [java] at org.jibx.schema.codegen.CodeGen.main(CodeGen.java:2202)

BUILD FAILED
W:\workspace_gbcadastre_TRUNK_WAS\AKE\gen.xml:16: Java returned: 1

Total time: 1 second


And here is the first part of the appropriate xml schema (including the keyword 
'redefine'):
<xs:schema xmlns:isov="http://www.ibm.com/isov/xmlschema"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:isovgbcase="http://www.ibm.com/isov/gb/casemanagement/xmlschema"; 
xmlns:isovfw="http://www.ibm.com/isov/fw/xmlschema"; 
xmlns:isovgbtestator="http://www.ibm.com/isov/gb/testator/xmlschema"; 
targetNamespace="http://www.ibm.com/isov/xmlschema"; 
elementFormDefault="qualified" attributeFormDefault="unqualified" 
version="1.0.0">
        <xs:redefine schemaLocation="../../base/schema/isovbaseschema.xsd">
                <xs:complexType name="InterfaceDefinition">
                        <xs:annotation>
...

Using JAXB the same xml schema will generated java code without any exception 
(and not using any binding.xml information).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to