PQ51999: PROTECTION EXCEPTION ABEND0C4 HAPPENING WHEN CALLING JNI PRINTLN ON NULL OBJECT | |||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description ABEND0C4 0C4 occurring trying to print a null object using the jni call println. The WebSphere code is intercepting the jni println call and rather than pass the object along which the jvm will handle. When the WebSphere code attempts to manipulate the object being passed and the object is a null object, the abend occurs.Local fix In the customer code, adding a check for null prior to calling the jni println function will prevent the abend from occurring.Problem summary **************************************************************** * USERS AFFECTED: All users of WebSphere Application Server * * V4.0 for z/OS and OS/390. * **************************************************************** * PROBLEM DESCRIPTION: ABENDS0C4/ABEND0C4 occurs while trying * * to print a null object using println. * * The WebSphere Application Server code * * is intercepting the println call and * * rather than passing the call to the * * JVM, which can handle a null object * * in println. When the WebSphere * * Application Server code passes the null * * object to the JNI the abend occurs. * **************************************************************** * RECOMMENDATION: * **************************************************************** The method "println" in the PrintStreamWriter class needs to check that it has not received a NULL java.lang.String as its input parameter before calling StubServices.println. The StubServices.println method makes a JNI call to C++ which in turn calls the JNI function getStringUTFChars. This JNI function assumes that the string being passed is not NULL and does not check the string before creating a UTF string out of the string being passed. So when a null string is passed it causes an ABEND0C4 and the JVM is unable to recover.Problem conclusion The JVM handles a null object in println by returning a string containing the characters "null" as output. To keep the output from StubServices.println acting like the JVM, a check has been put in the PrintStreamWriter class to see if the string being passed is null and if it is then return a string that contains the character string "null" to the output stream. APAR PQ51999 is associated with SERVICE LEVEL W400033 of WebSphere Application Server V4.0 for z/OS and OS/390.Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: UQ57807 Modules/Macros
|
Document Information |
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server for z/OS
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ51999
IBM Group: Software Group
Modified date: Oct 2, 2001
(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.