Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The type initializer threw an exception

37 views
Skip to first unread message

bijay

unread,
Feb 9, 2007, 9:55:02 AM2/9/07
to
We migrated our windows application from 1.1 to 2.0. The debug and Release
mode of the application work fine with some tweaking. But when the setup
project is migrated to 2.0 the installation gives the follwing error:

Message:The type initializer for
'Microsoft.ApplicationBlocks.Cache.CacheService'
threw an exception.


- <ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="TestDev"
ExceptionManager.TimeStamp="2/7/2007 1:06:36 PM"
ExceptionManager.FullName="Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1913.30369, Culture=neutral, PublicKeyToken=null"
ExceptionManager.AppDomainName="sst.exe" ExceptionManager.ThreadIdentity=""
ExceptionManager.WindowsIdentity="TRADERPUBDEV\user" />
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
ParamName="cacheStorage" Data="System.Collections.ListDictionaryInternal"
TargetSite="Void
Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata, System.Xml.XmlNode)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging.Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(CacheService
cachingService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata,
XmlNode configSection)</StackTrace>
</Exception>
</ExceptionInformation>
- <ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="TestDev"
ExceptionManager.TimeStamp="2/7/2007 1:06:40 PM"
ExceptionManager.FullName="Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1913.30369, Culture=neutral, PublicKeyToken=null"
ExceptionManager.AppDomainName="Sales Studio.exe"
ExceptionManager.ThreadIdentity=""
ExceptionManager.WindowsIdentity="TRADERPUBDEV\user" />
- <Exception ExceptionType="System.Exception" Message="The XML configuration
document is invalid, the ScavengingInfo section defines a type (assembly:
'Microsoft.ApplicationBlocks.Cache', type
'Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging') which an
instance can't be created." Data="System.Collections.ListDictionaryInternal"
TargetSite="Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm
CreateInstance(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService
cacheService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata) at
Microsoft.ApplicationBlocks.Cache.CacheService..ctor()</StackTrace>
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
ParamName="cacheStorage" Data="System.Collections.ListDictionaryInternal"
TargetSite="Void
Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata, System.Xml.XmlNode)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging.Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(CacheService
cachingService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata,
XmlNode configSection) at
Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService
cacheService, ICacheStorage cacheStorage, ICacheMetadata
cacheMetadata)</StackTrace>
</Exception>
</Exception>
</ExceptionInformation>

Laura T.

unread,
Feb 9, 2007, 10:17:39 AM2/9/07
to
Did you notice this in your exception trace:

"
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
"

"bijay" <bi...@discussions.microsoft.com> ha scritto nel messaggio
news:7636C267-98E6-4266...@microsoft.com...

bijay

unread,
Feb 9, 2007, 10:23:03 AM2/9/07
to
Yes, I have. We are using applicationblock version 1.0 for caching. it works
fine with framework 1.0. But when we migrated our application to 2.0 the
application works fine on VS 2005 IDE (both Release and Debug). When we
create a set-up package and install the follwing error occurs.

Laura T.

unread,
Feb 9, 2007, 10:53:00 AM2/9/07
to
Have you checked that all the .config files are deployed correctly.
It seems to me that the <cacheStorage> is missing or cannot be found and for
that reason the caching application block cannot be initialized.

(check
http://codebetter.com/blogs/david.hayden/archive/2005/03/04/56523.aspx if
needed).

"bijay" <bi...@discussions.microsoft.com> ha scritto nel messaggio

news:35142B71-32FD-4028...@microsoft.com...

bijay

unread,
Feb 9, 2007, 1:41:00 PM2/9/07
to
We know that. But we don't know if anything has changed as far as 'config' or
'ref' is concerned when Applicationblocks 1.0 cache dll is used on frameowrk
2.0 applications.
0 new messages