IV27266: ONE SURROGATE PAIR COUNTED AS TWO CHARS BY THE XML SCHEMA VALIDA TOR

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

APAR status

  • Closed as program error.

Error description

  • Error Message: Value '?' with length = '2' is  not facet-valid
    with respect to maxLength '1' for type 'XXXType'
    .
    Stack Trace: org.xml.sax.SAXParseException: cvc-maxLength-valid:
    
     Value '?' with length = '2' is not facet-valid with respect to
    
     maxLength '1' for type 'XXXType'.
     at
    org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExcepti
    on(
     at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown
    Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
    Source)
     at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
    Source)
     at
    org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter
    
        .reportError(Unknown Source)
    
     at
    org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError
    
     at
    org.apache.xerces.impl.xs.XMLSchemaValidator.processOneAttribute
    
     at
    org.apache.xerces.impl.xs.XMLSchemaValidator.processAttributes
    .
    

Local fix

  • N/A
    

Problem summary

  • When the XML Schema validator computes the length of a
    string in characters it does so using String.length() instead of
    
    counting the number of Unicode code points. With String.length()
    a
    surrogate pair (representing a single character) is counted as
    two
    characters instead of one.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR12
    6.0.1 SR4
    .
    Introduced a system property for controlling how
    string length is computed by the schema validator. When
    
    org.apache.xerces.impl.dv.xs.useCodePointCountForStringLength is
    set to
    true, the length of an xs:string or xs:anyURI value is
    calculated by
    counting the number of Unicode code points in the string. The
    value of
    the system property is false by default, preserving the long
    standing
    behaviour of computing length in Java chars (i.e.
    String.length()).     .
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV27266

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-08-30

  • Closed date

    2012-09-04

  • Last modified date

    2013-03-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    PM85330

Fix information

  • Fixed component name

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

Runtimes for Java Technology
Java Class Libraries

Software version:

6.0

Reference #:

IV27266

Modified date:

2013-03-21

Translate my page

Machine Translation

Content navigation