KB Article #177023

Issues retrieving cached database queries after upgrading

Problem

-- After upgrading a pre-7.1.1 installation of API Gateway to 7.1.1 or higher, cached database queries no longer have all of their elements.

Resolution

* A change was introduced in 7.1.1 such that the retrieve from or write to database filter returns an ArrayList, rather than a HashMap as it did in previous versions. This can affect the way selector expressions behave, particularly with regard to caching.

For example. if one had retrieved database results into test.example and then cached test.example, they would be able to access ${test.example.item[0]} both before and after caching. In 7.3.1, you get an ArrayList, so when the item is returned from cache, you get a null pointer error because there's nothing there. To fix this, you have to change the selector format to access ${test.example[0].item} instead. This selector will work both before and after test.example is returned from a cache.