Fixes are available
9.0.5.1: WebSphere Application Server traditional Version 9.0.5 Fix Pack 1
9.0.5.2: WebSphere Application Server traditional Version 9.0.5 Fix Pack 2
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
9.0.5.3: WebSphere Application Server traditional Version 9.0.5 Fix Pack 3
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
When using JSF 2.2 in Liberty 19.0.0.3, the following error occurs: [5/31/19 6:54:24:386 EDT] 0000002f org.apache.myfaces.webapp.AbstractFacesInitializer E An error occured while initializing MyFaces: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 javax.faces.FacesException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at org.apache.myfaces.config.DefaultFacesConfigurationProvider. getC lassloaderFacesConfig(DefaultFacesConfigurationProvider.java :342 ) at org.apache.myfaces.config.DefaultFacesConfigurationMerger.ge tFac esConfigData(DefaultFacesConfigurationMerger.java:101) at org.apache.myfaces.config.FacesConfigurator.configure(FacesC onfi gurator.java:603) at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConf igur ation(AbstractFacesInitializer.java:437) at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContaine rInt egration(Jsp21FacesInitializer.java:74) at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces (Abs tractFacesInitializer.java:186) at org.apache.myfaces.webapp.StartupServletContextListener.cont extI nitialized(StartupServletContextListener.java:119) at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCr eate d(WebApp.java:2377) at com.ibm.ws.webcontainer31.osgi.webapp.WebApp31.notifyServlet Cont extCreated(WebApp31.java:514) at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java :100 5) ... Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1967) at org.apache.myfaces.view.facelets.util.Classpath._searchFromU RL(C lasspath.java:246) at org.apache.myfaces.view.facelets.util.Classpath._searchResou rce( Classpath.java:119) at org.apache.myfaces.view.facelets.util.Classpath.search(Class path .java:69) at org.apache.myfaces.config.DefaultFacesConfigResourceProvider .get MetaInfConfigurationResources(DefaultFacesConfigResourceProv ider .java:90) at org.apache.myfaces.config.DefaultFacesConfigurationProvider. getC lassloaderFacesConfig(DefaultFacesConfigurationProvider.java :312 ) ... 21 more
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: WebSphere Application Server 9.0 and 8.5.5 * * users of JavaServer Faces (JSF) and * * WebSphere Liberty Profile users of jsf-2.0 * * and jsf-2.2 * **************************************************************** * PROBLEM DESCRIPTION: The Faces Servlet fails to initialize * * due to a * * StringIndexOutOfBoundsException. * **************************************************************** * RECOMMENDATION: * **************************************************************** A StringIndexOutOfBoundsException is sometimes thrown during JSF Initialization which then causes an uncaught initialization exception. For Liberty, this occurs when using loose application deployments. Below are the two separate stack traces: Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.base/java.lang.String.substring(String.java:2628) at org.apache.myfaces.view.facelets.util.Classpath._searchFromURL(C lasspath.java:236) at org.apache.myfaces.view.facelets.util.Classpath._searchResource( Classpath.java:117) at org.apache.myfaces.view.facelets.util.Classpath.search(Classpath .java:69) SRVE0276E: Error while initializing Servlet [Faces Servlet]: javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception created by servlet at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapp er.java:366) at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupChec k(ServletWrapper.java:1398) at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(Web App.java:1145) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinall y(WebApp.java:1113) at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:101 4) at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:656 6)
Problem conclusion
The JSF MyFaces 2.0 and 2.2 code has been updated to avoid throwing the StringIndexOutOfBoundsException. More information about the fix can be found here: https://issues.apache.org/jira/browse/MYFACES-4292 This was fixed under Open Liberty Issue #5898: https://github.com/OpenLiberty/open-liberty/issues/5898 The fix for this APAR is currently targeted for inclusion in fix pack WebSphere Application Server 8.5.5.17 and 9.0.5.1. It has been fixed in the jsf-2.2 feature in WebSphere Liberty 19.0.0.6 and the jsf-2.0 feature in WebSphere Liberty 19.0.0.7. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PH12946
Reported component name
WAS LIBERTY COR
Reported component ID
5725L2900
Reported release
855
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2019-06-07
Closed date
2019-08-21
Last modified date
2019-08-21
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
WAS LIBERTY COR
Fixed component ID
5725L2900
Applicable component levels
R855 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
27 April 2022