Nhib1_configuration standardquerycache exception find bug

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.