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

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 PQ68860
Reported component name WEBSPHERE AE NT
Reported component ID 5630A2201
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2002-12-05
Closed date 2002-12-23
Last modified date 2003-03-21

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:
PQ72327

Modules/Macros
XJB          

Fix information
Fixed component name WEBSPHERE AE NT
Fixed component ID 5630A2201

Applicable component levels
R400 PSY    UP


Document Information


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