IBM Support

PH60859: ARRAYOUTOFBOUNDSEXCEPTION WHILST USING THE JCICS KSDS CLASS AS A BEAN IN SPRING BOOT

A fix is available

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • An application that uses Spring Boot in CICS Liberty is using
    the KSDS class from the JCICS library. The Bean creating the
    class instance uses the @RequestScoped annotation.
    
    After updating CICS from 5.6 to 6.1 the application no longer
    starts and the following exception is thrown :
    
    java.lang.ArrayIndexOutOfBoundsException: Array index out of
    range: 0
     at org.springframework.cglib.core.CodeEmitter.load_arg
     (CodeEmitter.java:374)
     at org.springframework.cglib.proxy.Enhancer$6.
     emitLoadArgsAndInvoke(Enhancer.java:1280)
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED: All CICS users.                              *
    ****************************************************************
    * PROBLEM DESCRIPTION: ArrayIndexOutOfBoundsException from the *
    *                      Spring framework CodeEmitter.load_arg   *
    *                      method at application initialization.   *
    ****************************************************************
    A Spring Boot application is deployed to a Liberty JVM server.
    The application uses the JCICS KSDS class as a @Resource with a
    method that returns a new KSDS annotated with @RequestScope and
    @Bean.
    
    Upon startup the following exception occurs:
    
    org.springframework.beans.factory.BeanCreationException
    
    This was caused by a:
    
    org.springframework.aop.framework.AopConfigException
    
    Which was caused by a java.lang.ArrayIndexOutOfBoundsException
    in the org.springframework.cglib.core.CodeEmitter.load_arg
    method.
    
    The problem could also occur if the KeyedFile, ESDS or RRDS
    classes are used rather than KSDS.  These three classes all
    extend a non-public class File which contains method unlock().
    KeyedFile, ESDS, KSDS and RRDS do not override unlock().
    

Problem conclusion

  • CICS has been updated so that JVM server entry/exit trace is not
    injected into the compiler generated unlock() method added to
    KeyedFile, KSDS, ESDS and RRDS.  This prevents the
    ArrayIndexOutOfBoundsException from the Spring Framework code.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH60859

  • Reported component name

    CICS TS Z/OS V6

  • Reported component ID

    5655YA100

  • Reported release

    400

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2024-04-12

  • Closed date

    2024-06-03

  • Last modified date

    2024-07-01

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

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

    UI97142

Modules/Macros

  • DFJ@H356
    

Fix information

  • Fixed component name

    CICS TS Z/OS V6

  • Fixed component ID

    5655YA100

Applicable component levels

  • R400 PSY UI97142

       UP24/06/08 P F406

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.

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSGMGV","label":"CICS Transaction Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Line of Business":{"code":"LOB70","label":"Z TPS"}}]

Document Information

Modified date:
02 July 2024