Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    XML Patron Export adds invalid XML for patron phone when phone number is null

    • Product: Voyager
    • Product Version: 9.2.1; 10.1.0
    • Relevant for Installation Type: Dedicated-Direct, Direct, Local

    Symptoms

    XML Patron Import using file generated by XML Patron Export results in error:

    ERROR: 'org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 60; cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'phone', because the {nillable} property of 'phone' is false.' 
    Input file is not well formed (line 2 column 60): cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'phone', because the {nillable} property of 'phone' is false.

    Defect Status

    Issue VYG-7130 is resolved in Voyager 10.1.0.

    Replication Steps

    1. Find a patron record with a null phone number in PATRON_PHONE.
    2. Run an XML patron export that will capture that patron record.
    3. Note the XML for the phone number:
    <patronPhoneList>
    <patronPhone>
    <phone xsi:nil="true"/>
    <type>Primary</type>
    </patronPhone>
    </patronPhoneList>
    
    1. Using the same file, run XML patron import to add the records back into the database.
    2. Resulting error:

    ERROR: 'org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 60; cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'phone', because the {nillable} property of 'phone' is false.'
    Input file is not well formed (line 2 column 60): cvc-elt.3.1: Attribute 'http://www.w3.org/2001/XMLSchema-instance,nil' must not appear on element 'phone', because the {nillable} property of 'phone' is false

    Workaround

    1. Find null phone numbers:
    select a.patron_id
     ,p.phone_number 
     from patron_address a 
     ,patron_phone p 
     where a.address_id=p.address_id 
     and p.phone_number is null;
    
    1. Edit patron records in Circulation to update phone number to non-null value (e.g., (000)000-0000) or delete phone number.
    2. Save.

    • Article last edited: 31-May-2018