Nhib1_configuration standardquerycache exception find bug
2013.06.02
# Region
Configuration. cache (C => // (cache)
{
C. usequerycache = defaultusequerycache;
C. useminimalputs = true;
C. regionsprefix = "cache ";
C. defaultexpiration = 60; // second
If (defaultusesecondlevelcache)
{
C. provider C. querycache <standardquerycache> ();//
// Configuration. setproperty (environment. usesecondlevelcache, "true ");
// Configuration. setproperty (environment. querycachefactory, typeof (standardquerycachefactory). fullname );
}
});
# Endregion
Nhibbench. hibernateexception not processed
Message = cocould not instantiate iquerycachefactory: nhib.pdf. cache. standardquerycache, nhib.pdf, version = 3.3.1.4000, culture = neutral, publickeytoken = aa95f207798dfdb4
Source = nhib.pdf
Stacktrace:
In Nhibernate. cfg. settingsfactory. buildsettings (idictionary '2 properties)
In Nhibernate. cfg. configuration. buildsettings ()
In Nhibernate. cfg. configuration. buildsessionfactory ()
In COM. zfrong. arch. common. data. NH. core. nhsessionfactorymanager. buildsessionfactory (string key) Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ core \ nhsessionfactorymanager. CS: row number 40
In COM. zfrong. arch. common. data. NH. core. nhsessionfactorymanager. getsessionfactory (string key) Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ core \ nhsessionfactorymanager. CS: Row 26
In COM. zfrong. arch. common. data. NH. core. nhsessionmanager. getsessionfactory (string key) Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ core \ nhsessionmanager. CS: line number 71
In COM. zfrong. arch. common. data. NH. core. nhsessionmanager. bindcurrentsession (string key, iinterceptor interceptor) Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ core \ nhsessionmanager. CS: row number 35
In COM. zfrong. arch. common. data. NH. core. nhsessionmanager. bindcurrentsession (string key) Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ core \ nhsessionmanager. CS: row 28
In COM. zfrong. arch. common. data. NH. databaseimp. get_currentsession () Location F: \ develop \ COM. zfrong. arch \ common \ data \ NH \ databaseimp. CS: Row 54
Location F: \ develop \ com. zfrong. Arch \ common \ data \ NH \ test2.cs: Row 69 in NH. Test. test2.initdata (string key, int64 row)
Location F: \ develop \ com. zfrong. Arch \ common \ data \ NH \ test2.cs: row number 139 in NH. Test. test2.test1 (int32 I, int32 J)
Location F: \ develop \ com. zfrong. Arch \ common \ data \ NH \ test2.cs: row number 113 at NH. Test. test2.testthead ()
Location F: \ develop \ com. zfrong. Arch \ common \ data \ NH \ test2.cs: row number 107 in NH. Test. test2.main (string [] ARGs)
Innerexception: system. missingmethodexception
Message = No parameter-free constructor is defined for this object.
Source = mscorlib
Stacktrace:
In system. runtimetypehandle. createinstance (runtimetype type, Boolean publiconly, Boolean nocheck, Boolean & canbecached, runtimemethodhandleinternal & ctor, Boolean & bneedsecuritycheck)
In system. runtimetype. createinstanceslow (Boolean publiconly, Boolean skipcheckthis, Boolean fillcache)
In system. runtimetype. createinstancedefaultctor (Boolean publiconly, Boolean skipvisibilitychecks, Boolean skipcheckthis, Boolean fillcache)
In system. activator. createinstance (type, Boolean nonpublic)
In system. activator. createinstance (type)
In nhib.pdf. bytecode. activatorobjectsfactory. createinstance (type)
In Nhibernate. cfg. settingsfactory. buildsettings (idictionary '2 properties)
Innerexception:
Solve
Program
# Region
Configuration. cache (C => // (cache)
{
C. usequerycache = defaultusequerycache;
C. useminimalputs = true;
C. regionsprefix = "cache ";
C. defaultexpiration = 60; // second
If (defaultusesecondlevelcache)
{
C. provider // C. querycache <standardquerycache> (); // is error
// Is OK
Configuration. setproperty (environment. usesecondlevelcache, "true ");
Configuration. setproperty (environment. querycachefactory, typeof (standardquerycachefactory). fullname );
}
});
# Endregion