Commerce Server General - Commerce.CacheManager: Dictionary error: Value for key 'Connection

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > December 2004 > Commerce.CacheManager: Dictionary error: Value for key 'Connection





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commerce.CacheManager: Dictionary error: Value for key 'Connection
Sam

2004-12-06, 2:46 am

When the basket.pcf pipeline is executed, at the OrderDiscount component the
following error is raised:

Commerce.OrderDiscount.1
"Commerce.CacheManager: Dictionary error: Value for key 'ConnectionString'
in dictionary 'AdminConfig' missing (expected a variant of type 8)"
(orderform=default)


I have read posts in the past with the common response being that there is
an issue when the CacheManager is first setup with incorrect connectionstring
values being passed (or not at all). However I have checked and rechecked
this. Here is the code that is used to create the cache manager:

Function getCacheManager(dictConfig As MSCSCoreLib.CDictionary, eval As
EXPRARCHLib.ExpressionEval) As CacheCompLib.CacheManager

Dim oCacheManager, dictCampaignConfig, dictTransactionConfig
Dim dictProductListCacheConfig, dictQCICacheConfig,
dictDiscountProductInfoConfig
Dim dictDefaultPageConfig, dictProductPageConfig, dictStaticSectionsConfig
Dim dictSearchDeptPageConfig, dictStepSearchPageConfig,
dictFTSearchPageConfig

Dim baseURL
baseURL = "http://www.healthchemist.co.nz"

Set dictConfig = New MSCSCoreLib.CDictionary

Rem Create CacheManager object
Set oCacheManager = New CacheCompLib.CacheManager

Rem If left commented, the Application virtual directory will be
Rem automatically detected. Note: This may cause problems with the
Rem Campaigns Production Refresh BizDesk module if the site is accessed
Rem as "localhost" or some name only valid from certain machines.
oCacheManager.AppUrl = "http://www.healthchemist.co.nz"
Rem Create the config dictionaries
Set dictCampaignConfig = New MSCSCoreLib.CDictionary
dictCampaignConfig("ConnectionString") =
dictConfig.s_CampaignsConnectionString
Set dictCampaignConfig("Evaluator") = eval

Set dictTransactionConfig = New MSCSCoreLib.CDictionary
dictTransactionConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString

'**** begin catalog-related cache configs ***
' Note the first specified catalog-related cache config, must specify
' ConnectionString/CacheSize/CacheName/AppUrl for Commerce.LRUCache
' (subsequent ones do not, as they piggyback the first in bdrefresh.asp)
Set dictProductListCacheConfig = New MSCSCoreLib.CDictionary
dictProductListCacheConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictProductListCacheConfig("CacheSize") = 10000
dictProductListCacheConfig("TableName") = "CatalogCache_Virtual_Directory"
dictProductListCacheConfig("CacheName") = "CatalogCache"
dictProductListCacheConfig("AppUrl") = baseURL

Set dictQCICacheConfig = New MSCSCoreLib.CDictionary
dictQCICacheConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictQCICacheConfig("CacheSize") = 10000
dictQCICacheConfig("TableName") = "CatalogCache_Virtual_Directory"
dictQCICacheConfig("CacheName") = "CatalogCache"
dictQCICacheConfig("AppUrl") = baseURL

Set dictDiscountProductInfoConfig = New MSCSCoreLib.CDictionary
dictDiscountProductInfoConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictDiscountProductInfoConfig("CacheSize") = 10000
dictDiscountProductInfoConfig("TableName") =
"CatalogCache_Virtual_Directory"
dictDiscountProductInfoConfig("CacheName") = "CatalogCache"
dictDiscountProductInfoConfig("AppUrl") = baseURL

Set dictProductPageConfig = New MSCSCoreLib.CDictionary
dictProductPageConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictProductPageConfig("CacheSize") = 10000
dictProductPageConfig("TableName") = "CatalogCache_Virtual_Directory"
dictProductPageConfig("CacheName") = "CatalogCache"
dictProductPageConfig("AppUrl") = baseURL

'**** end catalog-related cache configs ***

Rem
Rem Create the Caches, inject them with configuration
Rem


Rem Configure CacheManager for ads
oCacheManager.RefreshInterval("advertising") = 5 * 60
oCacheManager.RetryInterval("advertising") = 60
oCacheManager.LoaderProgId("advertising") =
"Commerce.CSFLoadAdvertisements"
oCacheManager.WriterProgId("advertising") = "Commerce.CSFWriteEvents"
Set oCacheManager.LoaderConfig("advertising") = dictCampaignConfig
Set oCacheManager.WriterConfig("advertising") = dictCampaignConfig

Rem Configure CacheManager for discounts
Rem Note that the RefreshInterval for discounts is set to zero, which
disables automatic
Rem cache refreshing. With this setting, discounts must manually be
refreshed using the
Rem BizDesk "Production Refresh" Module under Campaigns. It is set this
way to prevent
Rem the servers in a web farm from having disparate sets of discounts
loaded at any given time.
Rem If you aren't using DNS round-robin, you could set the
RefreshInterval to a nonzero number
Rem so that discounts automatically go into production during background
refreshes.
oCacheManager.RefreshInterval("discounts") = 0
oCacheManager.RetryInterval("discounts") = 60
oCacheManager.LoaderProgId("discounts") = "Commerce.CSFLoadDiscounts"
oCacheManager.WriterProgId("discounts") = "Commerce.CSFWriteEvents"
Set oCacheManager.LoaderConfig("discounts") = dictCampaignConfig
Set oCacheManager.WriterConfig("discounts") = dictCampaignConfig

Rem Configure CacheManager for Tax
oCacheManager.RefreshInterval("SampleRegionalTaxCache") = 5 * 60
oCacheManager.RetryInterval("SampleRegionalTaxCache") = 60
oCacheManager.LoaderProgId("SampleRegionalTaxCache") =
"Commerce.SampleRegionalTaxCache"
Set oCacheManager.LoaderConfig("SampleRegionalTaxCache") =
dictTransactionConfig

Rem Configure CacheManager for Shipping
oCacheManager.RefreshInterval("ShippingManagerCache") = 5 * 60
oCacheManager.RetryInterval("ShippingManagerCache") = 60
oCacheManager.LoaderProgId("ShippingManagerCache") =
"Commerce.ShippingManagerCache"
Set oCacheManager.LoaderConfig("ShippingManagerCache") =
dictTransactionConfig

Rem Configure CacheManager For ProductList Fragment Caching
oCacheManager.RefreshInterval("ProductListCache") = 60 * 60
oCacheManager.RetryInterval("ProductListCache") = 5 * 60
oCacheManager.CacheObjectProgId("ProductListCache") = "Commerce.LRUCache"
oCacheManager.LoaderProgId("ProductListCache") = "Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("ProductListCache") =
dictProductListCacheConfig

Rem Configure CacheManager For QueryCatalogInfoCache
oCacheManager.RefreshInterval("QueryCatalogInfoCache") = 60 * 60
oCacheManager.RetryInterval("QueryCatalogInfoCache") = 5 * 60
oCacheManager.CacheObjectProgId("QueryCatalogInfoCache") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("QueryCatalogInfoCache") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("QueryCatalogInfoCache") =
dictQCICacheConfig

Rem Configure CacheManager For Discounts Product Information
oCacheManager.RefreshInterval("DiscountProductInfo") = 60 * 60
oCacheManager.RetryInterval("DiscountProductInfo") = 5 * 60
oCacheManager.CacheObjectProgId("DiscountProductInfo") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("DiscountProductInfo") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("DiscountProductInfo") =
dictDiscountProductInfoConfig

Rem Configure CacheManager For Product.asp
oCacheManager.RefreshInterval("ProductPageCache") = 60 * 60
oCacheManager.RetryInterval("ProductPageCache") = 5 * 60
oCacheManager.CacheObjectProgId("ProductPageCache") = "Commerce.LRUCache"
oCacheManager.LoaderProgId("ProductPageCache") = "Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("ProductPageCache") = dictProductPageConfig


Rem Return the CacheManager instance, to be stored in the Application
collection
Set getCacheManager = oCacheManager
End Function


--------------------

This code is located in a vb6 com object called within the global.asax for
the site and passed the site config dictionary and expression evaluator.

I am really running out of ideas. Can anyone help?
(If you need more information please ask)
Nihit Kaul [MSFT]

2004-12-16, 6:50 pm

Hi,

Are you running this on the local server box or remotely? Could you post
any details from the eventviewer regarding this error?

Also - you should enable logging for the Basket pipeline (via the
Web.Config) and check the log file for any details around this error.

Thanks,
Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

--------------------
Thread-Topic: Commerce.CacheManager: Dictionary error: Value for key
'Connection
thread-index: AcTbUE3am1rIt3Y9Qmqt5kWMN9uiqQ==
X-WBNR-Posting-Host: 210.86.81.63
From: =?Utf-8?B?U2Ft?= <Sam@discussions.microsoft.com>
Subject: Commerce.CacheManager: Dictionary error: Value for key 'Connection
Date: Sun, 5 Dec 2004 20:59:02 -0800
Lines: 185
Message-ID: <765D58AC-4ECC-44A0-BBFD-735BF741E1E7@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path: cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: cpmsftngxa10.phx.gbl microsoft.public.commerceserver.general:15196
X-Tomcat-NG: microsoft.public.commerceserver.general

When the basket.pcf pipeline is executed, at the OrderDiscount component
the
following error is raised:

Commerce.OrderDiscount.1
"Commerce.CacheManager: Dictionary error: Value for key 'ConnectionString'
in dictionary 'AdminConfig' missing (expected a variant of type 8)"
(orderform=default)


I have read posts in the past with the common response being that there is
an issue when the CacheManager is first setup with incorrect
connectionstring
values being passed (or not at all). However I have checked and rechecked
this. Here is the code that is used to create the cache manager:

Function getCacheManager(dictConfig As MSCSCoreLib.CDictionary, eval As
EXPRARCHLib.ExpressionEval) As CacheCompLib.CacheManager

Dim oCacheManager, dictCampaignConfig, dictTransactionConfig
Dim dictProductListCacheConfig, dictQCICacheConfig,
dictDiscountProductInfoConfig
Dim dictDefaultPageConfig, dictProductPageConfig,
dictStaticSectionsConfig
Dim dictSearchDeptPageConfig, dictStepSearchPageConfig,
dictFTSearchPageConfig

Dim baseURL
baseURL = "http://www.healthchemist.co.nz"

Set dictConfig = New MSCSCoreLib.CDictionary

Rem Create CacheManager object
Set oCacheManager = New CacheCompLib.CacheManager

Rem If left commented, the Application virtual directory will be
Rem automatically detected. Note: This may cause problems with the
Rem Campaigns Production Refresh BizDesk module if the site is accessed
Rem as "localhost" or some name only valid from certain machines.
oCacheManager.AppUrl = "http://www.healthchemist.co.nz"
Rem Create the config dictionaries
Set dictCampaignConfig = New MSCSCoreLib.CDictionary
dictCampaignConfig("ConnectionString") =
dictConfig.s_CampaignsConnectionString
Set dictCampaignConfig("Evaluator") = eval

Set dictTransactionConfig = New MSCSCoreLib.CDictionary
dictTransactionConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString

'**** begin catalog-related cache configs ***
' Note the first specified catalog-related cache config, must specify
' ConnectionString/CacheSize/CacheName/AppUrl for Commerce.LRUCache
' (subsequent ones do not, as they piggyback the first in bdrefresh.asp)
Set dictProductListCacheConfig = New MSCSCoreLib.CDictionary
dictProductListCacheConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictProductListCacheConfig("CacheSize") = 10000
dictProductListCacheConfig("TableName") =
"CatalogCache_Virtual_Directory"
dictProductListCacheConfig("CacheName") = "CatalogCache"
dictProductListCacheConfig("AppUrl") = baseURL

Set dictQCICacheConfig = New MSCSCoreLib.CDictionary
dictQCICacheConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictQCICacheConfig("CacheSize") = 10000
dictQCICacheConfig("TableName") = "CatalogCache_Virtual_Directory"
dictQCICacheConfig("CacheName") = "CatalogCache"
dictQCICacheConfig("AppUrl") = baseURL

Set dictDiscountProductInfoConfig = New MSCSCoreLib.CDictionary
dictDiscountProductInfoConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictDiscountProductInfoConfig("CacheSize") = 10000
dictDiscountProductInfoConfig("TableName") =
"CatalogCache_Virtual_Directory"
dictDiscountProductInfoConfig("CacheName") = "CatalogCache"
dictDiscountProductInfoConfig("AppUrl") = baseURL

Set dictProductPageConfig = New MSCSCoreLib.CDictionary
dictProductPageConfig("ConnectionString") =
dictConfig.s_TransactionConfigConnectionString
dictProductPageConfig("CacheSize") = 10000
dictProductPageConfig("TableName") = "CatalogCache_Virtual_Directory"
dictProductPageConfig("CacheName") = "CatalogCache"
dictProductPageConfig("AppUrl") = baseURL

'**** end catalog-related cache configs ***

Rem
Rem Create the Caches, inject them with configuration
Rem


Rem Configure CacheManager for ads
oCacheManager.RefreshInterval("advertising") = 5 * 60
oCacheManager.RetryInterval("advertising") = 60
oCacheManager.LoaderProgId("advertising") =
"Commerce.CSFLoadAdvertisements"
oCacheManager.WriterProgId("advertising") = "Commerce.CSFWriteEvents"
Set oCacheManager.LoaderConfig("advertising") = dictCampaignConfig
Set oCacheManager.WriterConfig("advertising") = dictCampaignConfig

Rem Configure CacheManager for discounts
Rem Note that the RefreshInterval for discounts is set to zero, which
disables automatic
Rem cache refreshing. With this setting, discounts must manually be
refreshed using the
Rem BizDesk "Production Refresh" Module under Campaigns. It is set
this
way to prevent
Rem the servers in a web farm from having disparate sets of discounts
loaded at any given time.
Rem If you aren't using DNS round-robin, you could set the
RefreshInterval to a nonzero number
Rem so that discounts automatically go into production during
background
refreshes.
oCacheManager.RefreshInterval("discounts") = 0
oCacheManager.RetryInterval("discounts") = 60
oCacheManager.LoaderProgId("discounts") = "Commerce.CSFLoadDiscounts"
oCacheManager.WriterProgId("discounts") = "Commerce.CSFWriteEvents"
Set oCacheManager.LoaderConfig("discounts") = dictCampaignConfig
Set oCacheManager.WriterConfig("discounts") = dictCampaignConfig

Rem Configure CacheManager for Tax
oCacheManager.RefreshInterval("SampleRegionalTaxCache") = 5 * 60
oCacheManager.RetryInterval("SampleRegionalTaxCache") = 60
oCacheManager.LoaderProgId("SampleRegionalTaxCache") =
"Commerce.SampleRegionalTaxCache"
Set oCacheManager.LoaderConfig("SampleRegionalTaxCache") =
dictTransactionConfig

Rem Configure CacheManager for Shipping
oCacheManager.RefreshInterval("ShippingManagerCache") = 5 * 60
oCacheManager.RetryInterval("ShippingManagerCache") = 60
oCacheManager.LoaderProgId("ShippingManagerCache") =
"Commerce.ShippingManagerCache"
Set oCacheManager.LoaderConfig("ShippingManagerCache") =
dictTransactionConfig

Rem Configure CacheManager For ProductList Fragment Caching
oCacheManager.RefreshInterval("ProductListCache") = 60 * 60
oCacheManager.RetryInterval("ProductListCache") = 5 * 60
oCacheManager.CacheObjectProgId("ProductListCache") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("ProductListCache") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("ProductListCache") =
dictProductListCacheConfig

Rem Configure CacheManager For QueryCatalogInfoCache
oCacheManager.RefreshInterval("QueryCatalogInfoCache") = 60 * 60
oCacheManager.RetryInterval("QueryCatalogInfoCache") = 5 * 60
oCacheManager.CacheObjectProgId("QueryCatalogInfoCache") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("QueryCatalogInfoCache") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("QueryCatalogInfoCache") =
dictQCICacheConfig

Rem Configure CacheManager For Discounts Product Information
oCacheManager.RefreshInterval("DiscountProductInfo") = 60 * 60
oCacheManager.RetryInterval("DiscountProductInfo") = 5 * 60
oCacheManager.CacheObjectProgId("DiscountProductInfo") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("DiscountProductInfo") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("DiscountProductInfo") =
dictDiscountProductInfoConfig

Rem Configure CacheManager For Product.asp
oCacheManager.RefreshInterval("ProductPageCache") = 60 * 60
oCacheManager.RetryInterval("ProductPageCache") = 5 * 60
oCacheManager.CacheObjectProgId("ProductPageCache") =
"Commerce.LRUCache"
oCacheManager.LoaderProgId("ProductPageCache") =
"Commerce.LRUCacheFlush"
Set oCacheManager.LoaderConfig("ProductPageCache") =
dictProductPageConfig


Rem Return the CacheManager instance, to be stored in the Application
collection
Set getCacheManager = oCacheManager
End Function


--------------------

This code is located in a vb6 com object called within the global.asax for
the site and passed the site config dictionary and expression evaluator.

I am really running out of ideas. Can anyone help?
(If you need more information please ask)

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com