IBM Support

PM74568: CALLING RESPONSE.ENCODEURL(MYURL) AFTER HTTPSESSION IS INVALIDATED GENERATES JAVA.LANG.NULLPOINTEREXCEPTION

Fixes are available

8.0.0.6: WebSphere Application Server V8.0 Fix Pack 6
7.0.0.29: WebSphere Application Server V7.0 Fix Pack 29
8.0.0.7: WebSphere Application Server V8.0 Fix Pack 7
8.0.0.8: WebSphere Application Server V8.0 Fix Pack 8
7.0.0.31: WebSphere Application Server V7.0 Fix Pack 31
7.0.0.33: WebSphere Application Server V7.0 Fix Pack 33
8.0.0.9: WebSphere Application Server V8.0 Fix Pack 9
7.0.0.35: WebSphere Application Server V7.0 Fix Pack 35
8.0.0.10: WebSphere Application Server V8.0 Fix Pack 10
7.0.0.37: WebSphere Application Server V7.0 Fix Pack 37
8.0.0.11: WebSphere Application Server V8.0 Fix Pack 11
7.0.0.39: WebSphere Application Server V7.0 Fix Pack 39
8.0.0.12: WebSphere Application Server V8.0 Fix Pack 12
7.0.0.41: WebSphere Application Server V7.0 Fix Pack 41
8.0.0.13: WebSphere Application Server V8.0 Fix Pack 13
7.0.0.43: WebSphere Application Server V7.0 Fix Pack 43
8.0.0.14: WebSphere Application Server V8.0 Fix Pack 14
7.0.0.45: WebSphere Application Server V7.0 Fix Pack 45
8.0.0.15: WebSphere Application Server V8.0 Fix Pack 15
7.0.0.29: Java SDK 1.6 SR13 FP2 Cumulative Fix for WebSphere Application Server
7.0.0.45: Java SDK 1.6 SR16 FP60 Cumulative Fix for WebSphere Application Server
7.0.0.31: Java SDK 1.6 SR15 Cumulative Fix for WebSphere Application Server
7.0.0.35: Java SDK 1.6 SR16 FP1 Cumulative Fix for WebSphere Application Server
7.0.0.37: Java SDK 1.6 SR16 FP3 Cumulative Fix for WebSphere Application Server
7.0.0.39: Java SDK 1.6 SR16 FP7 Cumulative Fix for WebSphere Application Server
7.0.0.41: Java SDK 1.6 SR16 FP20 Cumulative Fix for WebSphere Application Server
7.0.0.43: Java SDK 1.6 SR16 FP41 Cumulative Fix for WebSphere Application Server
Obtain the fix for this APAR.

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • A java.lang.NullPointerException is generated when invoking the￴
    Response.encodeURL() method after the  HTTP session is￴
    invalidated.
    In pseudo code:
        HttpSession session=...;                                   ￴
        session.invalidate();                                      ￴
    
        .......                                                    ￴
    
        HttpServletResponse response=....;                         ￴
        response.encodeURL(myURL); //this is where the exception is￴
    thrown
        ........                                                   ￴
    The Exception thrown is
    Trace: 2012/07/08 13:13:40.936 01 t=AC92D8 c=UNK key=P8￴
    (13007002)
      ThreadId: 0000004a                                           ￴
    
      FunctionName:￴
    com.ibm.ws.webcontainer.servlet.ServletWrapper.service
      SourceId: com.ibm.ws.webcontainer.servlet
      Category: SEVERE
      ExtendedMessage: SRVE0068E: Uncaught exception created in one￴
    of the service methods of the servlet gus in application￴
    gus_tsta. Exception
    created : org.springframework.web.util.NestedServletException:￴
    Request
    processing failed; nested exception is￴
    java.lang.NullPointerException
    Caused by: java.lang.NullPointerException
     at java.lang.String.concat(String.java:489)
     at com.ibm.ws.session.SessionAffinityManager.encodeURL
        (SessionA ffinityManager.java:314)
     at com.ibm.ws.session.SessionAffinityManager.encodeURL
        (SessionAffinityManager.java:396)                          ￴
     at com.ibm.ws.session.SessionContext.encodeURL
        (SessionContext. java: 881)
     at com.ibm.ws.webcontainer.srt.SRTRequestContext.encodeURL
        (SRTReque stContext.java:135)
     at com.ibm.ws.webcontainer.webapp.WebAppDispatcherContext.￴   ￴
        encodeURL (WebAppDispatcherContext.java:309)
     at com.ibm.ws.webcontainer.srt.SRTServletResponse.encodeURL
       (SRTServ letResponse.java:940)                              ￴
     at com.ibm.ws.webcontainer.srt.SRTServletResponse.
        encodeRedirectURL (SRTServletResponse.java:923)            ￴
     at org.....                                                   ￴
           .....
     at org.springframework.web.servlet.FrameworkServlet.doGet￴
    (Framework Servlet.java:430)
     at javax.servlet.http.HttpServlet.service￴
    (HttpServlet.java:718)
     at javax.servlet.http.HttpServlet.service￴
    (HttpServlet.java:831)
     at com.ibm.ws.webcontainer.servlet.ServletWrapper.
        service (ServletWr apper.java:1657)
     at                                                            ￴
    
    com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(Ser
    ￴
    vletWrap
    per.java:939)                                                  ￴
    
     at .....                                                      ￴
    
               .....                                               ￴
    
     at                                                            ￴
    
    com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.
     processRequ est(HttpInboundLink.java:305)
     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready￴
    HttpInboundLink.java:276)
     at com.ibm.ws390.channel.xmem.XMemConnLink.ready   ￴
    (XMemConnLink.java: 858)
     at com.ibm.ws390.channel.xmem.XMemInboundChannel.handleRequest￴
        (XMem InboundChannel.java:340)
     at com.ibm.ws390.xmem.XMemSRBridgeImpl.httpinvoke
    (XMemSRBridgeImpl. java:104)                                   ￴
     at com.ibm.ws390.xmem.XMemSRCppUtilities.httpinvoke
        (XMemSRCppUtilit ies.java:74)
     at com.ibm.ws390.orb.ServerRegionBridge.httpinvoke
        (ServerRegionBrid ge.java:215)
     at com.ibm.ws390.orb.ORBEJSBridge.httpinvoke
        (ORBEJSBridge.java : 281)
     at sun.reflect.GeneratedMethodAccessor107.invoke(Unknown
        Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke￴
    (DelegatingMethod AccessorImpl.java:37)
     at java.lang.reflect.Method.invoke(Method.java:611)
     at com.ibm.ws390.orb.parameters.HTTPInvoke.HTTPIn***BUFFER￴
    OVERFLOW***
    .
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V7.0, V8.0 and V8.5                  *
    ****************************************************************
    * PROBLEM DESCRIPTION: The session manager may throw a         *
    *                      java.lang.NullPointerException when     *
    *                      encoding an URL.                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When invoking the
    javax.servlet.http.HttpServletResponse.encodeURL() method
    after the HTTP session is invalidated, the session manager
    will throw a java.lang.NullPointerException.
    

Problem conclusion

  • Code changes were made to the session manager to handle
    encoding a url after the session has been invalidated.
    
    APAR PM74568 is currently targeted for inclusion in WebSphere
    Application Server Fix Packs 7.0.0.29, 8.0.0.6, and 8.5.0.2.
    
    Please refer to URL:
    //www.ibm.com/support/docview.wss?rs=404&uid=swg27006970
    for Fix Pack availability.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM74568

  • Reported component name

    WEBSPHERE FOR Z

  • Reported component ID

    5655I3500

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-10-08

  • Closed date

    2012-12-19

  • Last modified date

    2013-07-03

  • 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

    WEBSPHERE FOR Z

  • Fixed component ID

    5655I3500

Applicable component levels

  • R700 PSY UK94926

       UP13/06/20 P F306

Fix is available

  • Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.



Document information

More support for: WebSphere Application Server for z/OS
General

Software version: 7.0

Reference #: PM74568

Modified date: 03 July 2013