Products | Versions |
---|---|
TIBCO Data Virtualization | All supported versions |
When a user configures Incremental caching in TIBCO Data Virtualization, they may encounter the below error message while executing the "Initial Snapshot" (A script used to create the cache table):
-----------------------
A system exception has occurred.
at AnonymousProcedure (line 16)
caused by: Unable to assign a NULL value to column "cachekey" since the column is not nullable. [data-2911084] [script-1900011]
Unable to assign a NULL value to column "cachekey" since the column is not nullable.
-----------------------
A typical Initial Script uses the GetEnvironment call in the procedure to fetch the cacheKey. This error points out that the procedure is not passing the cacheKey during the process.
-----------------------
CALL /lib/util/GetEnvironment('System.CACHED_RESOURCE_CACHE_KEY', cacheKey);
-----------------------
- A sample procedure can be created to test if the GetEnvironment is not fetching the cacheKey at all and is forwarding it as Null.
-----------------------
PROCEDURE GetCacheKey()
BEGIN
DECLARE cacheKey BIGINT;
CALL /lib/util/GetEnvironment('System.CACHED_RESOURCE_CACHE_KEY', cacheKey);
CALL /lib/debug/Log('CHECKPOINT # 1: cachedResourceCacheKey = ' || cacheKey);
END
-----------------------
- When the procedure GetCacheKey() is executed, it may not return any value and this is the reason that NULL is being inserted into the cacheKey column which is marked as Not Null.