Fixes are available
8.5.5.9: WebSphere Application Server V8.5.5 Fix Pack 9
8.5.5.10: WebSphere Application Server V8.5.5 Fix Pack 10
8.5.5.11: WebSphere Application Server V8.5.5 Fix Pack 11
8.5.5.12: WebSphere Application Server V8.5.5 Fix Pack 12
8.5.5.13: WebSphere Application Server V8.5.5 Fix Pack 13
8.5.5.14: WebSphere Application Server V8.5.5 Fix Pack 14
8.5.5.15: WebSphere Application Server V8.5.5 Fix Pack 15
8.5.5.17: WebSphere Application Server V8.5.5 Fix Pack 17
8.5.5.20: WebSphere Application Server V8.5.5.20
8.5.5.18: WebSphere Application Server V8.5.5 Fix Pack 18
8.5.5.19: WebSphere Application Server V8.5.5 Fix Pack 19
8.5.5.16: WebSphere Application Server V8.5.5 Fix Pack 16
8.5.5.21: WebSphere Application Server V8.5.5.21
APAR status
Closed as program error.
Error description
We have a method annotated as follows:- @POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.TEXT_XML) When we look through the parts on zOS, using: while (iterator.hasNext()) { InPart part = iterator.next(); InputStream is = part.getBody(InputStream.class, null); ... } we see an exception java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1092) at org.apache.wink.common.internal.providers.multipart.MultiPar tParser.parseHeaders(MultiPartParser.java:264) at org.apache.wink.common.internal.providers.multipart.MultiPar tParser.nextPart(MultiPartParser.java:109) at org.apache.wink.common.model.multipart.InMultiPart.hasNext(I nMultiPart.java:83) ... The headers going over the wire are in UTF-8, but it seems that Wink is trying to decode them as platform encoding (for example, a new String(bytes), without a codepage specified). On a Windows/Linux operating system this would work for normal codepoints, but on z/OS, EBCDIC encoding is nothing like UTF-8, so the assumption wouldn't work.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server Liberty Profile - JAX-RS 1.1 on * * z/OS * **************************************************************** * PROBLEM DESCRIPTION: Apache Wink data conversion issue for * * Multi-part MIME on z/OS * **************************************************************** * RECOMMENDATION: * **************************************************************** This problem only occurrs on z/OS operating systems. Apache Wink is trying to decode a HTTP header whose encoding is UTF-8 from byte[] to String via new String (byte [] data, int start, int length), not taking any encoding into account. The platform encoding will be used. On z/OS, the platform encoding is EBCDIC, this causes a java.lang.StringIndexOutOfBoundsException to be thrown. java.lang.StringIndexOutOfBoundsException at java.lang.String.substring(String.java:1092) at org.apache.wink.common.internal.providers.multipart.MultiPartPar ser.parseHeaders(MultiPartParser.java:264) at org.apache.wink.common.internal.providers.multipart.MultiPartPar ser.nextPart(MultiPartParser.java:109) at org.apache.wink.common.model.multipart.InMultiPart.hasNext(InMul tiPart.java:83) ...
Problem conclusion
We now use new String (byte [] data, int start, int length, final String encoding) instead of new String (byte [] data, int start, int length) when decoding the HTTP header. The fix for this APAR is currently targeted for inclusion in fix pack8.5.5.9. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PI50692
Reported component name
WAS LIBERTY COR
Reported component ID
5725L2900
Reported release
855
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2015-10-16
Closed date
2016-02-23
Last modified date
2016-02-23
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
WAS LIBERTY COR
Fixed component ID
5725L2900
Applicable component levels
R855 PSY
UP
Document Information
Modified date:
28 April 2022