I am trying to use JAXB to auto-generated the elements defined in the hibernate-mapping-3.0.dtd file; but I get the following error:
Code:
5/19/09 2:50:23 PM GMT-05:00: [ERROR] XJC while parsing schema(s) file:/C:/Dev/aviall_jedi_workspace/hibernate-tools-ext/src/main/resources/hibernate-dtd/hibernate-mapping-3.0.dtd[382]: com.sun.istack.SAXParseException2: Property "Formula" is already defined. Use <jaxb:property> to resolve this conflict.
5/19/09 2:50:23 PM GMT-05:00: [ERROR] XJC while parsing schema(s) file:/C:/Dev/aviall_jedi_workspace/hibernate-tools-ext/src/main/resources/hibernate-dtd/hibernate-mapping-3.0.dtd[732]: com.sun.istack.SAXParseException2: Property "Type" is already defined. Use <jaxb:property> to resolve this conflict.
I am able to auto-generate the hibernate-mappings.dtd file successfully. The only difference between these two files that causes these errors are the following:
hibernate-mapping-3.0.dtd:
Code:
<!ELEMENT one-to-one (meta*,formula*)>
vs hibernate-mapping.dtd:
Code:
<!ELEMENT one-to-one (meta*|formula*)>
And hibernate-mapping-3.0.dtd:
Code:
<!ELEMENT element ( (column|formula)*, type? )>
vs hibernate-mapping.dtd:
Code:
<!ELEMENT element (column|formula)*>
Its seems there is a problem when specifying both children elements "formula" and "type". But when specifying either or via the "Or" operator, all works fine.
You can download a example JAXB2 project at
https://maven-jaxb2-plugin.dev.java.net/docs/guide.html. Look for a link called, "See the sample JAXB2 plugins project for example.".
Any suggestion is much appreciated!
Thanks!