IBM Support

PI63949: When auth-method tag is not used in Liberty a NullPointerExcepti on is thrown

Fixes are available

16.0.0.3: WebSphere Application Server Liberty 16.0.0.3
16.0.0.4: WebSphere Application Server Liberty 16.0.0.4
17.0.0.1: WebSphere Application Server Liberty 17.0.0.1
17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • This probem occurs when there is a login-config, but without
    auth-method
    
    OK:
    
    
    BASIC
    my_realm
    
    
    Not OK:
    
    
    my_realm
    
    
    
    
    ERROR   ] SRVE0315E: An exception occurred:
    java.lang.Throwable: java.
    lang.NullPointerException
    at
    com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.j
    ava:
    4913)
    at [internal classes]
    Caused by: java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:459)
    at com.ibm.ws.webcontainer.srt.SRTServletRequest.
    setPrivateAttribute(SRTServletRequest.java:302)
    ... 1 more
    

Local fix

  • add following line to web.xml <auth-method>BASIC</auth-method>
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - Security                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: NullPointerException occurs if auth-    *
    *                      method is not coded in the login-config *
    *                      element of the web.xml file.            *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When developing a Web Application, if the auth-method element is
    omitted from the web.xml files login-config a
    NullPointerException will occur:
    com.ibm.ws.webcontainer.webapp.WebApp                        1
    logTrace log.servlet.error
    
    java.lang.NullPointerException
    
    java.lang.NullPointerException
    	at
    com.ibm.ws.webcontainer.srt.SRTServletRequest.setPrivateAttribut
    e(SRTServletRequest.java:295)
    	at
    com.ibm.ws.webcontainer.security.internal.SRTServletRequestUtils
    .setPrivateAttribute(SRTServletRequestUtils.java:61)
    	at
    com.ibm.ws.webcontainer.security.WebAuthenticatorProxy.authentic
    ate(WebAuthenticatorProxy.java:94)
    	at
    com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.
    authenticateRequest(WebAppSecurityCollaboratorImpl.java:955)
    	at
    com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.
    determineWebReply(WebAppSecurityCollaboratorImpl.java:774)
    	at
    com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.
    performSecurityChecks(WebAppSecurityCollaboratorImpl.java:604)
    	at
    com.ibm.ws.webcontainer.security.WebAppSecurityCollaboratorImpl.
    preInvoke(WebAppSecurityCollaboratorImpl.java:528)
    	at
    com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.preIn
    vokeCollaborators(CollaboratorHelper.java:458)
    	at
    com.ibm.ws.webcontainer.osgi.collaborator.CollaboratorHelperImpl
    .preInvokeCollaborators(CollaboratorHelperImpl.java:267)
    	at
    com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters
    (WebAppFilterManager.java:1125)
    	at
    com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleReques
    t(CacheServletWrapper.java:82)
    	at
    com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.
    java:934)
    	at
    com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVir
    tualHost.java:262)
    	at
    com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$T
    askWrapper.run(HttpDispatcherLink.java:958)
    	at
    com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.w
    rapHandlerAndExecute(HttpDispatcherLink.java:357)
    	at
    com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.r
    eady(HttpDispatcherLink.java:317)
    	at
    com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleD
    iscrimination(HttpInboundLink.java:471)
    	at
    com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleN
    ewRequest(HttpInboundLink.java:405)
    	at
    com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.process
    Request(HttpInboundLink.java:285)
    	at
    com.ibm.ws.http.channel.internal.inbound.HttpICLReadCallback.com
    plete(HttpICLReadCallback.java:66)
    	at
    com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(
    WorkQueueManager.java:504)
    	at
    com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQu
    eueManager.java:574)
    	at
    com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQu
    eueManager.java:929)
    	at
    com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQ
    ueueManager.java:1018)
    	at
    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExec
    utor.java:1157)
    	at
    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExe
    cutor.java:627)
    	at java.lang.Thread.run(Thread.java:809)
    

Problem conclusion

  • In WebSphere Application Server Full Profile, this condition
    results in defaulting to Basic Authentication method. Liberty
    has been changed to behave the same, it will default to Basic
    Authentication method.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 16.0.0.3.  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

    PI63949

  • 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

    2016-06-09

  • Closed date

    2016-08-10

  • Last modified date

    2016-08-10

  • 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":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
15 October 2021