IBM Support

PH04727: ILLEGAL LOCALE VALUE : ZH-HANS-CN

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Exception occurred when accessing in browser of language
    environment zh-Hans-CN
    
    WAS 9.0.0.5, Window 10
    The browser is Windows Edge.
    The language environment of the browser is Chinese (Simplified).
    
    As a result of accessing the application from the above PC, the
    following message is output to the application log.
    
    Application Log
    ------
    2018-09-20 13:13:30.868 Aut-CL01 00619267 I APFW9999 unknown
    ExceptionMapper catched Illegal locale value : zh-Hans-CN
    2018-09-20 13:13:30.868 Aut-CL01 00619267 I APFW9999 unknown
    ExceptionMapper catched java.lang.IllegalArgumentException:
    Illegal locale value : zh-Hans-CN
    at
    org.apache.cxf.jaxrs.utils.HttpUtils.getLocale(HttpUtils.java:28
    0)
    at
    org.apache.cxf.jaxrs.impl.HttpHeadersImpl.getAcceptableLanguages
    (HttpHeadersImpl.java:169)
    at
    org.apache.cxf.jaxrs.impl.AbstractRequestContextImpl.getAcceptab
    leLanguages(AbstractRequestContextImpl.java:51)
    at
    com.ibm.jp.awag2.common.provider.CreateRequestContextFilter.filt
    er(CreateRequestContextFilter.java:53)
    at
    org.apache.cxf.jaxrs.utils.JAXRSUtils.runContainerRequestFilters
    (JAXRSUtils.java:1701)
    at
    org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processReque
    st(JAXRSInInterceptor.java:256)
    at
    org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessag
    e(JAXRSInInterceptor.java:98)
    at
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInte
    rceptorChain.java:307)
    at
    org.apache.cxf.transport.ChainInitiationObserver.onMessage(Chain
    InitiationObserver.java:121)
    at
    org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abs
    tractHTTPDestination.java:256)
    at
    com.ibm.ws.jaxrs20.endpoint.AbstractJaxRsWebEndpoint.invoke(Abst
    ractJaxRsWebEndpoint.java:147)
    at
    com.ibm.websphere.jaxrs.server.IBMRestServlet.handleRequest(IBMR
    estServlet.java:187)
    at
    com.ibm.websphere.jaxrs.server.IBMRestServlet.doPost(IBMRestServ
    let.java:145)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    at
    com.ibm.websphere.jaxrs.server.IBMRestServlet.service(IBMRestSer
    vlet.java:133)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWr
    apper.java:1235)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(Ser
    vletWrapper.java:779)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(Ser
    vletWrapper.java:478)
    at
    com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest
    (ServletWrapperImpl.java:178)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(We
    bAppFilterChain.java:143)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:96)
    at
    com.ibm.jp.awag2.common.filter.DefaultServletFilter.doFilter(Def
    aultServletFilter.java:60)
    at
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(Fi
    lterInstanceWrapper.java:197)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:90)
    at
    com.ibm.jp.awag2.common.filter.AccessLoggingFilter.doFilter(Acce
    ssLoggingFilter.java:93)
    at
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(Fi
    lterInstanceWrapper.java:197)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:90)
    at
    org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jSe
    rvletFilter.java:71)
    at
    com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(Fi
    lterInstanceWrapper.java:197)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebApp
    FilterChain.java:90)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebA
    ppFilterManager.java:969)
    at
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters
    (WebAppFilterManager.java:1109)
    at
    com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:
    4150)
    at
    com.ibm.ws.webcontainer.webapp.WebAppImpl.handleRequest(WebAppIm
    pl.java:2208)
    at
    com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.j
    ava:304)
    at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.
    java:1030)
    at
    com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContai
    ner.java:1817)
    at
    com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLin
    k.java:382)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscr
    imination(HttpInboundLink.java:465)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRe
    quest(HttpInboundLink.java:532)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequ
    est(HttpInboundLink.java:318)
    at
    com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complet
    e(HttpICLReadCallback.java:88)
    at
    com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureComp
    leted(AioReadCompletionListener.java:175)
    at
    com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyn
    cFuture.java:217)
    at
    com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncC
    hannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at
    com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at
    com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHand
    ler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server                                      *
    ****************************************************************
    * PROBLEM DESCRIPTION: When HTTP requests with Chinese         *
    *                      languages such as zh-Hans-CN will       *
    *                      result in an illegalArgumentException.  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When HTTP request is initiated
    and if the Chinese Input is enable,
    the header would look like:
    "Accept-Language: en-GB;q=1,
    zh-Hans-SG;q=0.9, en-SG;q=0.8"
    resulting in an exception:
    For example:  ExceptionMapper catched
    java.lang.IllegalArgumentException:
    Illegal locale value : zh-Hans-CN
    

Problem conclusion

  • This problem was addressed in CXF under JIRA CSF-6640 and
    included in CXF version 3.1.1.   The purpose of this APAR is
    to back-port this change to the version of CXF used on
    WebSphere Application Server version 9.0.
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 9.0.0.11.  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

    PH04727

  • 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

    2018-10-31

  • Closed date

    2019-01-15

  • Last modified date

    2019-01-15

  • 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:
01 November 2021