IBM Support

JR48782: CMVC 233081 - Exceptions related to the cache configuration are thrown when running JUnit test cases

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Typically, customizations and extensions to WebSphere Commerce
    are deployed to the WebSphereCommerceServerExtensionsLogic
    project. However, if such extensions are used within the context
     of a JUnit test case, an exception may be thrown when the
    object cache doesn't exist. For example:
    
     Caused by: java.lang.ClassCastException:
     com.ibm.ws.naming.util.CacheableReference incompatible with
    com.ibm.websphere.cache.DistributedMap
       at
    com.ibm.commerce.datatype.CacheConfigurationInfo.myGetCacheInfoU
    nsynchronized(CacheConfigurationInfo.java:602)
    

Local fix

Problem summary

  • USERS AFFECTED:
     WebSphere Commerce users on v7.0 developing test cases using
    JUnit
    
     PROBLEM ABSTRACT:
     Exceptions related to the cache configuration are thrown when
    running JUnit test cases
    
     BUSINESS IMPACT:
     Unable to complete JUnit testcases without a caching
    configuration
    
     RECOMMENDATION:
    

Problem conclusion

  • With this fix, the exception is caught and the runtime continues
     as if the object cache did not exist.
     The data cache code was changed to ignore exceptions thrown by
    the InitialContext when it is used to look up a DistributedMap
    object cache by its JNDI name.
    
     -------------------------------------------------------------
     The latest available maintenance information can be obtained
    from the Recommended Fixes for WebSphere Commerce technote:
     http://www.ibm.com/support/docview.wss?rs=3046&uid=swg21261296
    

Temporary fix

Comments

APAR Information

  • APAR number

    JR48782

  • Reported component name

    WC BUS EDITION

  • Reported component ID

    5724I3800

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-12-10

  • Closed date

    2014-06-19

  • Last modified date

    2014-06-19

  • 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

    WC BUS EDITION

  • Fixed component ID

    5724I3800

Applicable component levels

  • R700 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYSYL","label":"WebSphere Commerce Enterprise"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
19 June 2014