IBM Support

RS01344: IS ONE OF TEST LISTING AN EMPTY STRING CAUSES STRINGINDEXOUTOFBOUNDSEXCEPTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using DE for zRES ruleset build mode, ruleset execution may
    fail with exception below when one rule uses a "is one of" test
    that lists one empty string, such as: £ 'some value' is one of {
    "ABC", "" }
    The same issue may occur with "is not one of".
    Exception in thread "main" java.lang.ExceptionInInitializerError
     at java.lang.J9VMInternals.initialize(J9VMInternals.java:
    222)
     at com.ibm.brl.generated.engine.CondExecEnv.
    evaluateBooleanMethod0(Unknown Source)
     at com.ibm.brl.generated.engine.CondExecEnv.
    evaluateBooleanMethodHook(Unknown Source)
    at com.ibm.rules.engine.rete.runtime.state.
    AbstractConditionExecEnv.evaluateBooleanMethod(Unknown Source)
    at com.ibm.rules.engine.rete.runtime.network.impl.
    IlrEvaluateAlphaNode.initMemory(Unknown Source)
     £ £  £at com.ibm.rules.engine.rete.runtime.network.impl.
    IlrAbstractLogicObjectAlphaNode.activate(Unknown Source)
     £ £  £at com.ibm.rules.engine.rete.runtime.network.impl.
    IlrDynamicRuleActionNode.activate(Unknown Source)
     £ £  £at com.ibm.rules.engine.rete.runtime.network.impl.
    IlrStandardNetwork.activateAllRules(Unknown Source)
     at com.ibm.rules.engine.rete.runtime.AbstractReteEngine.
    transiteHardToOngoingState(Unknown Source)
     at com.ibm.rules.engine.rete.runtime.AbstractReteEngine.
    execute(Unknown Source)
     at com.ibm.rules.engine.rete.runtime.AbstractReteEngine.
    execute(Unknown Source)
     at SimpleDecisionEngineRunner.main(
    SimpleDecisionEngineRunner.java:31)
    Caused by: java.lang.StringIndexOutOfBoundsException
     at java.lang.String.charAt(String.java:419)
     at com.ibm.rules.engine.bytecode.runtime.SwitchStringTabl
    a(Unknown Source)
     at com.ibm.rules.engine.bytecode.runtime.SwitchStringTabl
    fill(Unknown Source)
     at com.ibm.rules.generated.
    CompileTimeConstantArrayContainsMethods.$initialize$stringMap0(
    Unknown Source)
     at com.ibm.rules.generated.
    CompileTimeConstantArrayContainsMethods.<clinit>(Unknown Source)
    t java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:
    200)
    .. 11 more
    

Local fix

  • set the list first in the definitions part of the rule, as in:
    definitions
       set 'list1' to {"XYZ", ""}
    if  'some value' is one of list1
    then ....
    

Problem summary

  • incorrect management of lists
    

Problem conclusion

  • the code is modified to correctly handle lists.
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS01344

  • Reported component name

    WDS FOR RULES

  • Reported component ID

    5725B6903

  • Reported release

    801

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-05-30

  • Closed date

    2013-06-21

  • Last modified date

    2013-06-21

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

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

Modules/Macros

  • None
    999
    

Fix information

  • Fixed component name

    WDS FOR RULES

  • Fixed component ID

    5725B6903

Applicable component levels

  • R801 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.1","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 February 2022