Получение Duplicate Element Exception при чтении данных XML с использованием JIBX в Java - PullRequest
0 голосов
/ 31 октября 2019

Я получаю исключение для тега FullAddress.
Может кто-нибудь помочь мне решить эту проблему?

org.jibx.runtime.JiBXException: Duplicate element "(неизвестное имя, позиция 6 в связующей структуре) "(строка 14, столбец 16).

ДАННЫЕ XML:

<ArrayOfConsolidatedList    xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/">
    <ConsolidatedList>
        <AliasType>AKA</AliasType>
        <AliasTypeName>AKA</AliasTypeName>
        <Country>Indonesia</Country>
        <CountryOfBirth>(1)-(2) Indonesia</CountryOfBirth>
        <DateListed>2003-01-24T00:00:00</DateListed>
        <DateListedDay>24</DateListedDay>
        <DateListedMonth>1</DateListedMonth>
        <DateListedYear>2003</DateListedYear>
        <DateOfBirth>17/08/1958</DateOfBirth>
        <DateOfBirthId>1317</DateOfBirthId>
        <DayOfBirth>17</DayOfBirth>
        <FullAddress>Jalan Nakula Komplek Witana Harja III Blok C 106-107    Tangerang  Indonesia</FullAddress>

    </ConsolidatedList>
</ArrayOfConsolidatedList>

Конфигурация привязки XML

<namespace uri="http://schemas.datacontract.org/2004/07/" default="elements"/>  
 <collection  field="entityList" usage="optional" item-type="com.ramp.vo.PenVO" create-type="java.util.ArrayList"  ordered="false" >
            <structure  name="ConsolidatedList" usage="optional" ordered="false" >
                <value  name="ID" get-method="getPenId" set-method="setPenId" usage="optional"/>
                <value  name="DateListed" get-method="getCreatedDate" set-method="setCreatedDate" usage="optional"/>
                <value  name="LastUpdated" get-method="getLastUpdatedDate" set-method="setLastUpdatedDate" usage="optional"/>
                <value  name="FullName" get-method="getPenName" set-method="setPenName" usage="optional"/>
                <value  name="Position" get-method="getDesignation" set-method="setDesignation" usage="optional"/>
                <value  name="GroupTypeDescription" get-method="getEntityType" set-method="setEntityType" usage="optional"/>
               <collection  field="penAddressVOObject" usage="optional" item-type="com.ramp.vo.PenAddressVO" create-type="java.util.ArrayList"  >       
                    <structure type="com.ramp.vo.PenAddressVO"  usage="optional" >
                    <value style="element"  name="Country"  usage="optional" field="countryName"/>
                   <value  style="element" name="FullAddress" get-method="getAddress1" set-method="setAddress1"  usage="optional" />
                   <value style="element"  name="PostCode"  usage="optional" field="postalCode"/>

                   </structure>
             </collection>



            </structure>
         </collection>
</mapping>  
...