Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not instantiate CacheProvider #774

Closed
mazharqayyum opened this issue Oct 12, 2017 · 5 comments
Closed

Could not instantiate CacheProvider #774

mazharqayyum opened this issue Oct 12, 2017 · 5 comments

Comments

@mazharqayyum
Copy link
Contributor

mazharqayyum commented Oct 12, 2017

We make use of SysCache as our second level cache provider. After upgrade to version 5.0 its throwing following exception upon Configuration.BuildSessionFactory()

could not instantiate CacheProvider: NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache

at NHibernate.Cfg.SettingsFactory.CreateCacheProvider(IDictionary`2 properties)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary`2 properties)
at NHibernate.Cfg.Configuration.BuildSettings()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
@hazzik
Copy link
Member

hazzik commented Oct 12, 2017

Caches are not yet supported with 5.0: nhibernate/NHibernate-Caches#5

@hazzik hazzik closed this as completed Oct 12, 2017
@hazzik hazzik changed the title could not instantiate CacheProvider Could not instantiate CacheProvider Oct 16, 2017
@fredericDelaporte
Copy link
Member

Alpha versions have been published for SysCache, SysCache2 and RtMemoryCache. Let us now if they are working for you.

@mazharqayyum
Copy link
Contributor Author

mazharqayyum commented Oct 18, 2017

Awesome! After updating the package to alpha I am able to run our website with SysCache enabled. I don't have profiler enabled at the moment so can't see cache hit statements logged but its working now. Last time with old package it was resulting in hard error I posted above.

One question. I see that SysCache still needs Iesi.Collections. Aren't they abandoned/obsolete? Can you please expand on the fate of Iesi.Collections. During the upgrade from version 3 to 5 I had to replace Iesi.Collections.ISet with System.Collections.Generic.ISet and so removed the reference completely. Now its back with SysCache alpha so seems like still needed.

@fredericDelaporte
Copy link
Member

fredericDelaporte commented Oct 18, 2017

Thanks for having let us know,

Iesi is a dependency of NHibernate, and so comes as a dependency of caches too.
Iesi interfaces are no more used because they have been replaced by .Net Framework 4 equivalent interfaces in NHibernate 4 and Iesi 4. But some concrete Iesi implementations are still lacking in System.Generic.Collection (mainly ordered hashset), and so those Iesi concrete implementations are still used when needed by NHibernate.

@mazharqayyum
Copy link
Contributor Author

Alright, thanks for the explanation. Looks like lesi collections are going to stay with version 5 too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants