IBM Support

PH38339: STRINGINDEXOUTOFBOUNDSEXCEPTION OCCURS IN MYFACES WHEN CREATING A RESOURCE

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

  • ResourceHandlerImpl.createResource throws an
    StringIndexOutOfBoundsException if the resource is an empty
    string
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of MyFaces 2.2 on WebSphere           *
    *                  Application Server 9.0. Users of jsf-2.2    *
    *                  on WebSphere Liberty.                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: If a JSF application specifies an       *
    *                      empty string as a resource, then a      *
    *                      StringIndexOutOfBoundsException may     *
    *                      occur.                                  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The following stacktrace may be encountered:
    java.lang.StringIndexOutOfBoundsException: String index out of
    range: 0
    at java.lang.String.charAt(Unknown Source)
    at
    org.apache.myfaces.application.ResourceHandlerImpl.createResourc
    e(ResourceHandlerImpl.java:118)
    at
    javax.faces.application.ResourceHandlerWrapper.createResource(Re
    sourceHandlerWrapper.java:47)
    

Problem conclusion

  • The code has been updated to handle empty strings and throw an
    NPE if the resource is null, per the JSF specifications.  The
    open source issues are MYFACES-4065 and MYFACES-4187,
    respectively.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 9.0.5.10 and Liberty version 21.0.0.8.
    
    
    For more information, see 'Recommended Updates for
    WebSphere Application Server':
    https://www.ibm.com/support/pages/node/715553
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH38339

  • Reported component name

    WEBS APP SERV N

  • Reported component ID

    5724H8800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-06-23

  • Closed date

    2021-07-21

  • Last modified date

    2021-08-31

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

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

Fix information

  • Fixed component name

    WEBS APP SERV N

  • Fixed component ID

    5724H8800

Applicable component levels

  • R900 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
02 November 2021