To double-check, you did copy NHibernate.ByteCode.Castle.dll to your bin, right?
On Tue, Jul 21, 2009 at 1:18 PM, Brian Sullivan<[email protected]> wrote: > > Thanks for the replies, guys! > > James: I will try to create a failing test and get back to you. I > didn't realize that FNH defaulted to the Castle proxy factory > factory. Good to know, and a reasonable default, I think. > > Ben: I remember having this same problem working with the beta, so I > doubt it's that. I decided to stick with 2.0.1 until it went GA to > see if the problem went away, either by changes in FNH or NH itself. > > On Jul 21, 12:44 pm, Ben Hyrman <[email protected]> wrote: >> Here's one that is working fine for me against 2.1 beta (haven't gone >> to GA yet). I don't quite see where we differ.... I can go to 2.1GA >> and see if I run into your issue >> >> var fluentConfig = Fluently.Configure() >> .Database(MsSqlConfiguration.MsSql2005 >> .ConnectionString(c => c >> .Is("Data Source=........")) >> >> .ProxyFactoryFactory("NHibernate.ByteCode.LinFu.ProxyFactoryFactory, >> NHibernate.ByteCode.LinFu") >> .Cache(c => >> c.ProviderClass("NHibernate.Caches.SysCache.SysCacheProvider, >> NHibernate.Caches.SysCache")) >> .UseReflectionOptimizer() >> .DoNot.ShowSql()) >> .Mappings(m => >> { >> m.HbmMappings.AddFromAssemblyOf<IEntity>(); >> m.FluentMappings.AddFromAssemblyOf<IEntity>(); >> }); >> >> >> >> On Tue, Jul 21, 2009 at 12:14 PM, James Gregory<[email protected]> >> wrote: >> > Strange. It's not a requirement, FNH defaults to using Castle for the proxy >> > factory factory; however, you should still be able to specify it manually. >> > Can you create a failing test? >> >> > On Tue, Jul 21, 2009 at 5:37 PM, Brian Sullivan <[email protected]> >> > wrote: >> >> >> I'm trying to convert an application I've written using FNH and >> >> NH2.0.1GA to use the new 2.1GA libraries, but I'm running into a snag >> >> trying to specify my proxy factory factory. My configuration looks >> >> like this: >> >> >> SessionFactory = >> >> Fluently.Configure() >> >> .Database( >> >> MsSqlConfiguration.MsSql2005 >> >> .ConnectionString( >> >> c => c.Is >> >> (ConfigurationManager.ConnectionStrings >> >> ["josubscriptioncb"].ConnectionString)) >> >> .ProxyFactoryFactory >> >> ("NHibernate.ByteCode.Castle.ProxyFactoryFactory, >> >> NHibernate.ByteCode.Castle") >> >> ) >> >> .Mappings(m => >> >> >> m.FluentMappings.AddFromAssemblyOf<Campaign>() >> >> >> .ConventionDiscovery.AddFromAssemblyOf<Campaign> >> >> ()) >> >> .BuildConfiguration().SetProperties(new >> >> Dictionary<string, string>() >> >> { >> >> >> {"current_session_context_class", "web"} >> >> }) >> >> .BuildSessionFactory(); >> >> >> When I run the web app, I get the following exception: >> >> >> The ProxyFactoryFactory was not configured. >> >> Initialize 'proxyfactory.factory_class' property of the session- >> >> factory configuration section with one of the available >> >> NHibernate.ByteCode providers. >> >> Example: >> >> <property >> >> >> name='proxyfactory.factory_class'>NHibernate.ByteCode.LinFu.ProxyFactoryFac >> >> tory, >> >> NHibernate.ByteCode.LinFu</property> >> >> Example: >> >> <property >> >> >> name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFa >> >> ctory, >> >> NHibernate.ByteCode.Castle</property> >> >> >> I then tried to set the property myself using SetProperties like this: >> >> >> .BuildConfiguration().SetProperties(new Dictionary<string, string>() >> >> { >> >> >> {"current_session_context_class", "web"}, >> >> >> {"proxyfactory.factory_class", >> >> "NHibernate.ByteCode.Castle.ProxyFactoryFactory, >> >> NHibernate.ByteCode.Castle"} >> >> }) >> >> >> When I do that, though, I get a different exception: >> >> >> Could not find the dialect in the configuration >> >> >> What is the correct way to configure the proxy factory factory in >> >> FNH? Also, should the examples on the wiki on fluentnhibernate.org >> >> be updated to reflect this new configuration requirement? Thanks in >> >> advance for any help you all can provide. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Fluent NHibernate" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/fluent-nhibernate?hl=en -~----------~----~----~----~------~----~------~--~---
