PQ88867: NULLPOINTEREXCEPTION IN WEBSPHERE BUFFEREDSERVLETOUTPUTSTREAM MODULE

 A fix is available

Obtain the fix for this APAR



APAR status
Closed as program error.

Error description
This customer is getting NullPointerException in BufferedServlet
OutputStream when running his servlet that generates plain text
using the following code:
.
        URL url = new URL(printUrl);
        URLConnection con = url.openConnection();
        // Don't use a cached version of URL connection.
        con.setUseCaches(false);
        con.setDefaultUseCaches(false);
InputStreamReader is = new InputStreamReader(con.getInputStream(
"UTF8");
    char[] readChars = new char[2048];
    CharArrayWriter os = new CharArrayWriter(64000);
for (int readLen = is.read(readChars); readLen >= 0; readLen =
is.read(readChars)) {
        if (readLen > 0) {
            os.write(readChars, 0, readLen);
        }
    }
    is.close();
    oReturn = os.toCharArray();
    os.close();
.
.
When running this code he gets the following exception:
.
Trace: 2004/03/08 11:41:13.252 01 t=9E0B58 c=123A99.1 key=P8 (13
 FunctionName: com.ibm.ws.webcontainer.srt.WebGroup
 SourceId: com.ibm.ws.webcontainer.srt.WebGroup
 Category: INFO
 ExtendedMessage: SRVE0181I: [SFS] [/SFS] [Servlet.LOG]: Barcod
   PartRDBServlet: com.fedex.lh.mavis.sfs.controller.BarcodePart
   RDB: java.lang.NullPointerException
    at com.ibm.ws.webcontainer.srt.BufferedServletOutputStre
    at javax.servlet.ServletOutputStream.println(ServletOutp
    at com.fedex.lh.mavis.sfs.controller.BarcodeLabel.proces
    at com.fedex.lh.mavis.sfs.controller.BarcodeLabel.doGet(
    at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    at javax.servlet.http.HttpServlet.service(HttpServlet.ja
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServle
    at com.ibm.ws.webcontainer.servlet.IdleServletState.serv
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServle
        .
        .
        .
Local fix Problem summary
****************************************************************
* USERS AFFECTED: All users of WebSphere Application Server    *
*                 V5.0 for z/OS                                *
****************************************************************
* PROBLEM DESCRIPTION: BufferedServletOutputStream print       *
*                      method throws NullPointerException.     *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
NullPointerException is thrown from the print method of the
BufferedServletOutputStream when null value to be printed is
passed in as an argument.
Problem conclusion
BufferedServletOutputStream print method needs to be modified
to check for the null value before trying to print the value.
Code should not try to print any value when the argument passed
in is a null value.

APAR PQ88867 is associated with SERVICE LEVEL W502013 of
WebSphere Application Server V5.0 for z/OS.
Temporary fix Comments
APAR information
APAR number PQ88867
Reported component name WEBSPHERE FOR Z
Reported component ID 5655I3500
Reported release 500
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2004-05-14
Closed date 2004-07-20
Last modified date 2004-08-04

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:
PQ88872 PQ89477

Modules/Macros
BBOUBINF          

Publications Referenced

Fix information
Fixed component name WEBSPHERE FOR Z
Fixed component ID 5655I3500

Applicable component levels
R500 PSY UQ90831    UP04/07/27 P F407

  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


Current web document: swg1PQ88867.html
Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS
Operating system(s):
Software version: 500
Software edition:
Reference #: PQ88867
IBM Group: Software Group
Modified date: Aug 4, 2004