Skip to main content

Use a class customization to resolve this conflict.->compilation error from xjc

No replies
krishnainet
Offline
Joined: 2011-05-23
Points: 0

Errors thown
----------------------------
[ERROR]A class/interface with the same name "generated.XYZ" is already in use. Use a class customization to resolve this conflict.
line 84 of file:/hello.xsd

[ERROR] (Relevant to above error) another "XYZ" is generated from here.
line 77 of fille:/hello.xsd
[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 84 of file:/hello.xsd

[ERROR] (Related to above error) This is the other declaration.
line 77 of file:/hello.xsd
Snapshot of xsd file
----------------------------------
<xs:element name="XYZ">---line 77
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="xyz"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="xyz">-------line 84
<xs:complexType>
<xs:sequence>
<xs:element ref="pr"/>
<xs:element ref="date"/>
<xs:element minOccurs="0" ref="epodoc-pr"/>
</xs:sequence>
</xs:complexType>
</xs:element>
xyz is refered by XYZ, why was this generated as both of them are of different case? Also there was conflict of ObjectFactory class!. What are the ways so solve such issues for generating succeful class files?