Since (some arbitrary Lucee update) a few weeks ag...
# box-products
s
Since (some arbitrary Lucee update) a few weeks ago, we've started seeing this error in one of our API handlers whose only job is to fetch some instances of data and display them. I know where in our code the stack is referencing (even though it's not listed) but I don't know why the Coldbox call is failing. Anybody seen this reference to
getObjectMetadata
returning null?
Copy code
Error building: modules_app.api.modules_app.v1.handlers.game -> The function [getObjectMetadata] has an invalid return value , [Cannot cast null value to value of type [struct]]
					the function is located at [/app/coldbox/system/cache/store/indexers/MetadataIndexer.cfc]. DSL: , Path: modules_app.api.modules_app.v1.handlers.game,
					Error Location:
					/app/coldbox/system/cache/store/indexers/MetadataIndexer.cfc:128
/app/coldbox/system/cache/store/ConcurrentStore.cfc:122
/app/coldbox/system/cache/providers/CacheBoxProvider.cfc:216
/app/coldbox/system/cache/AbstractCacheBoxProvider.cfc:376
/app/coldbox/system/FrameworkSupertype.cfc:704
/app/coldbox/system/FrameworkSupertype.cfc:729
/app/coldbox/system/EventHandler.cfc:63
b
@sknowlton What version of ColdBox? Those line numbers don't line up with my local ColdBox repo
s
6.6.1
looks current to me
128 is
var metadata = getObjectMetadata( arguments.objectKey );
in
MetadataIndexer.cfc
b
Interesting--
poolMetadata
is an instance of
java.util.concurrent.ConcurrentHashMap
It would appear we're getting metadata on an object that no longer exists
Did your version of ColdBox change, or JUST Lucee?
s
Just Lucee
b
It seems that would have to be a race condition where the item was just removed from cache while another thread was in the process of trying to update that item's metadata. I'm not sure how the Lucee version would affect it however.
s
Might be a red herring, but the API endpoint hasn't changed in some time so it's odd that we're just now noticing it
b
I think you're just now hitting it for some reason
I think it never mattered back when reaping was more sync, but I think the overlaps become more common when we moved reaping into the async manager
s
Hm, possibly we updated to 6.6.1 during a period when there weren't many objects being returned by that endpoint. It's still pretty rare, three instances in three weeks
But yeah that looks like it