If you’ve decided to download the Castle ActiveRecord 2 Alpha version and see how it affects your existing projects, you’ll most likely get an error like this: “The ProxyFactoryFactory was not configured.Initialize 'proxyfactory.factory_class' property of the session-factory configuration section with one of the available NHibernate.ByteCode providers.”. This release of ActiveRecord makes use of NHibernate version 2.1.0.1003, which requires an additional entry in the configuration section to work correctly. The updated configuration section for your config file looks like this (line 13 in the example is what you’ll need to add):
1 <activerecord
2 isWeb="false"
3 isDebug="true"
4 threadinfotype=""
5 sessionfactoryholdertype=""
6 namingstrategytype="">
7 <config>
8 <add key="connection.provider" value="NHibernate.Connection.DriverConnectionProvider"/>
9 <add key="dialect" value="NHibernate.Dialect.MsSql2005Dialect"/>
10 <add key="connection.driver_class" value="NHibernate.Driver.SqlClientDriver"/>
11 <add key="connection.connection_string" value="Server=(local);initial catalog=AppTest; Integrated Security=SSPI"/>
12 <add key="show_sql" value="true"/>
13 <add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />
14 </config>
15 </activerecord>