If you log in
with your developerWorks ID, you can leave comments and feedback for the development team.
| Component |
ObjectGrid Core API |
| Software Version |
6.1 |
Problem
The getBeforeImage method of the LogElement interface returns a wrong value, resulting in a ClassCastException exception.
The getBeforeImage() method on the LogElement interface can incorrectly return a CacheEntry instead of the stored Object type. This behavior can result in a ClassCastException exception when casting the getBeforeImage() return value to your value type.
Cause
For certain LogElement types, a CacheEntry instance was returned instead of the Object type that was stored.
Workaround
Check to see if the Object that is returned from the getBeforeImage() method is an instance of CacheEntry. Cast the Object returned to CacheEntry and call the CacheEntry.getCommittedValue() method to get the Object with the correct class type.
Solution
Apply ObjectGrid cumulative intermediate fix 3.
© Copyright IBM Corporation 2007,2010. All Rights Reserved.