users@jaxb.java.net

What does it means? "compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings."

From: Raul Selas <raul.selas_at_gmail.com>
Date: Thu, 26 Apr 2007 11:03:45 +0200

Hello all!!

Im getting an error while trying to bind a XML schema to a Java. The XML
schema is the DocBook 4.5 XML Schema that you can get in
http://www.docbook.org/xsd/4.5/

The next is the xjc version im using:

raul_at_sensei:~/docbook/schema/xsd/4.5$ xjc.sh -version
xjc version "2.1.3-b01-fcs"
JavaTM Architecture for XML Binding(JAXB) Reference Implementation, (build
2.1.3-b01-fcs)
from package jaxb-ri-20070413

and java -version:
raul_at_sensei:~/docbook/schema/xsd/4.5$ java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)



When I try to parse the schema I get the a lot of errors (you can see the
complete output errors below) :

raul_at_sensei:~/docbook/schema/xsd/4.5$ xjc.sh -d /home/raul/ -p DocBook
docbook.xsd

Im interested in two of them cause I could solve others with jaxb
customizations.

[ERROR] Element "seeie" shows up in more than one properties.
  line 1737 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] The following location is relevant to the above error
  line 1733 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] Element "imageobjectco" shows up in more than one properties.
  line 3526 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 3525 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

Theses are the lines about the error in dbhierx.xsd

  1728 <!-- doc:An entry in an index. -->
  1729 <xs:element name="indexentry">
  1730 <xs:complexType>
  1731 <xs:sequence>
  1732 <xs:element ref="primaryie"/>
  1733 <xs:choice minOccurs="0" maxOccurs="unbounded">
  1734 <xs:element ref="seeie"/>
  1735 <xs:element ref="seealsoie"/>
  1736 </xs:choice>
  1737 <xs:sequence minOccurs="0" maxOccurs="unbounded">
  1738 <xs:element ref="secondaryie"/>
  1739 <xs:choice minOccurs="0" maxOccurs="unbounded">
  1740 <xs:element ref="seeie"/>
  1741 <xs:element ref="seealsoie"/>
  1742 <xs:element ref="tertiaryie"/>
  1743 </xs:choice>
  1744 </xs:sequence>
  1745 </xs:sequence>
  1746 <xs:attributeGroup ref="indexentry.attlist"/>
  1747 </xs:complexType>
  1748 </xs:element>


I' ve tried to use a customized binding as next:

(custom3.xjb)

<jxb:bindings version="1.0"
  xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
  jxb:extensionBindingPrefixes="xjc">
    <jxb:bindings schemaLocation="dbhierx.xsd" node="/xs:schema">
        <jxb:bindings
node="//xs:sequence[@minOccurs='0']//xs:choice/xs:element[@ref='seeie']">
            <jxb:property name="E1ASeeie"/>
        </jxb:bindings>
    </jxb:bindings>
</jxb:bindings>


However I get the next error (cutted for readability):


raul_at_sensei:~/docbook/schema/xsd/4.5$ xjc.sh -d /home/raul/ -p DocBook
docbook.xsd -b custom3.xjb
parsing a schema...
[ERROR] compiler was unable to honor this property customization. It is
attached to a wrong place, or its inconsistent with other bindings.
  line 8 of file:/home/raul/docbook/schema/xsd/4.5/custom3.xjb

[ERROR] (the above customization is attached to the following location in
the schema)
  line 1740 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] Element "seeie" shows up in more than one properties.
  line 1737 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] The following location is relevant to the above error
  line 1733 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd


I tried to use:
<jxb:class name="E1ASeeie"/> instead of

<jxb:property name="E1ASeeie"/>

but I get the same error.

I tried with xjc 2.0 version provided with java1.6 but similar errors are
reported.

So, Is there any customization to address this problem? ¿What exactly means
"compiler was unable to honor this property customization. It is attached to
a wrong place, or its inconsistent with other bindings."?


Thanks in advance,

Raul.


raul_at_sensei:~/docbook/schema/xsd/4.5$ xjc.sh -d /home/raul/ -p DocBook
docbook.xsd
parsing a schema...
[ERROR] Property "Revision" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 5965 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 521 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Element "seeie" shows up in more than one properties.
  line 1737 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] The following location is relevant to the above error
  line 1733 of file:/home/raul/docbook/schema/xsd/4.5/dbhierx.xsd

[ERROR] Element "imageobjectco" shows up in more than one properties.
  line 3526 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 3525 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] Property "Title" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 271 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 158 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] The following location is relevant to the above error
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

[ERROR] Property "Lang" is already defined. Use &lt;jaxb:property> to
resolve this conflict.
  line 570 of file:/home/raul/docbook/schema/xsd/4.5/dbpoolx.xsd

[ERROR] The following location is relevant to the above error
  line 66 of file:/home/raul/docbook/schema/xsd/4.5/htmltblx.xsd

Failed to parse a schema.
raul_at_sensei:~/docbook/schema/xsd/4.5$