PQ72327: ACTIVEX BRIDGE THROWS JAVA.LANG.ARRAYINDEXOUTOFBOUNDSEXCEPTION USING 0 LENGTH ARRAYS.

 Fixes are available

5.0.1: WebSphere Application Server Version 5.0 Fix Pack 1 (Version 5.0.1)
5.0.1: WebSphere Application Server Enterprise Edition Version 5.0 Fix Pack 1



APAR status
Closed as program error.

Error description
There are several problems related to the ActiveX bridge
and it's handling of arrays:
.
1. Zero length String and Object arrays cause
java.lang.ArrayIndexOutOfBoundsException
.
2. Arrays with multiple instance types (inherited from a base
class) do not work.
Local fix Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server Client          *
*                 users running ActiveX applications that      *
*                 access zero length Java arrays or access     *
*                 Java arrays with multiple instance types.    *
****************************************************************
* PROBLEM DESCRIPTION: An ArrayIndexOutOfBoundsException is    *
*                      thrown when accessing a zero length     *
*                      Java array from an ActiveX              *
*                      application.                            *
*                                                              *
*                      An IllegalArgumentException is thrown   *
*                      when accessing a Java array that        *
*                      contains objects of different instance  *
*                      types inherited from a base class.      *
*                                                              *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
The ActiveX Bridge code was incorrectly handling zero length
arrays and would throw:

java.lang.ArrayIndexOutOfBoundsException
at java.lang.reflect.Array.get(Native Method)

at com.ibm.ws.client.xjb.XJBByteWriter.getArrayDims
    (XJBByteWriter.java:153)

at com.ibm.ws.client.xjb.XJBByteWriter.putArray
    (XJBByteWriter.java:274)
at com.ibm.ws.client.xjb.XJBByteWriter.putJVariant
    (XJBByteWriter.java:343)

at com.ibm.ws.client.xjb.JDispatch.dispInvoke
    (JDispatch.java:777)

Also, the ActiveX bridge was incorrectly handling Java arrays
that contained different instance type of objects that are
inhertied from a common base class.  The following exception
was thrown:

java.lang.IllegalArgumentException: array element type mismatch
at java.lang.reflect.Array.set(Native Method)
at com.ibm.ws.client.xjb.JDispatch.getParamsFromJVariantArray
    (JDispatch.java:1159)
at com.ibm.ws.client.xjb.JDispatch.getParamsFromJDispParams
    (JDispatch.java:1060)
at com.ibm.ws.client.xjb.JDispatch.dispInvoke
(JDispatch.java:362)
Problem conclusion
The ActiveX Bridge code was changed to handle zero length
Java arrays and Java arrays with multiple instances types.
Temporary fix Comments
APAR information
APAR number PQ72327
Reported component name WAS BASE 5.0
Reported component ID 5630A3600
Reported release 00W
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-03-21
Closed date 2003-03-21
Last modified date 2003-03-21

APAR is sysrouted FROM one or more of the following:
PQ68860

APAR is sysrouted TO one or more of the following:

Modules/Macros
XJB          

Publications Referenced

Fix information
Fixed component name WAS BASE 5.0
Fixed component ID 5630A3600

Applicable component levels
R00W PSY    UP


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > General
Operating system(s):
Software version: 00W
Software edition:
Reference #: PQ72327
IBM Group: Software Group
Modified date: Mar 21, 2003