Hi, Let me present a simple case: My xml: <note_add_response><order_item_note orderhdr_id="3247" order_item_seq="1" order_item_note_seq="2" user_code="101" creation_date="2009-06-02T22:38:24" note_field="test comment"/></note_add_response>
My Binding: <mapping name="note_add_response" class="NoteAddResponse" ordered="false" value-style="attribute"> <structure field="orderItemNote" name="order_item_note" usage="optional" ordered="false" type="OrderItemNote"> <value style="attribute" field="noteField" name="note_field"/> <value style="attribute" field="userCode" name="user_code"/> <value style="attribute" field="creationDate" name="creation_date"/> <structure field="id" type="OrderItemNoteId"> <value style="attribute" field="orderhdrId" name="orderhdr_id"/> <value style="attribute" field="orderItemSeq" name="order_item_seq"/> <value style="attribute" field="orderItemNoteSeq" name="order_item_note_seq"/> </structure> </structure> </mapping> Classes are: public class NoteAddResponse { public OrderItemNote orderItemNote; } public class OrderItemNote implements java.io.Serializable { public OrderItemNoteId id; public String userCode; public Date creationDate; public String noteField; } public class OrderItemNoteId implements java.io.Serializable { public int orderhdrId; public int orderItemSeq; public int orderItemNoteSeq; } My Exception: org.jibx.runtime.JiBXException: Duplicate element "(unknown name, position 0 in binding structure)"(line 1, col 177) at org.jibx.runtime.impl.UnmarshallingContext.throwNameException(UnmarshallingContext.java:254) at NoteAddResponse.JiBX_binding_unmarshal_2_2(NoteAddResponse.java) at JiBX_bindingNoteAddResponse_access2.unmarshal() at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2762) at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2953) As you can see col 177 in the xml is end of order_item_note. I am not sure why is this giving exception. If I change that to <order_item_note/>, would that work. Actually I get this xml as a response of some web service so I don't have control over this xml. Same binding and xml used to work with 1.1.6 where as in 1.2.1 I am getting the above exception. Let me know what I am doing wrong. Thanks Sachin ----- http://www.assembla.com/wiki/show/sachin_mittal about me: -- View this message in context: http://www.nabble.com/Getting%3A-Duplicate-element-%22%28unknown-name%2C-position-0-in-binding-structure%29%22-after-upgrade-to-1.2.1-tp23845168p23845168.html Sent from the jibx-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users