Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 3rd, 2012  |  syntax: None  |  size: 2.08 KB  |  hits: 24  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Nhibernate.Util causing ProxyFactoryFactoryNotConfiguredException when configuration line exists in config
  2. NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException:
  3.     The ProxyFactoryFactory was not configured.
  4.     Initialize 'proxyfactory.factory_class' property of the session-factory
  5.     configuration section with one of the available NHibernate.ByteCode providers.
  6.     Example:
  7.     <property name='proxyfactory.factory_class'>
  8.     NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu
  9.     </property>
  10.     Example:
  11.     <property name='proxyfactory.factory_class'>
  12.     NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
  13.     </property>
  14.     [Continues down stack trace...]
  15.        
  16. <?xml version="1.0" encoding="utf-8" ?>
  17.    <hibernate-configuration  xmlns="urn:nhibernate-configuration-2.2" >
  18.     <session-factory name="Linx2">
  19.   <property
  20.         name="connection.driver_class">NHibernate.Driver.NpgsqlDriver</property>
  21.       <property name="dialect">Linx2.Common.Framework.PostgreSQL83Dialect,
  22.         Linx2.Common.Framework</property>
  23.   <property name="connection.connection_string">[Hidden so I don't get fired.]</property>
  24.       <property name="adonet.batch_size">10</property>
  25.   <property name="show_sql">false</property>
  26.   <property name="use_outer_join">true</property>
  27.   <property name="command_timeout">60</property>
  28.   <property name="query.substitutions">true 1, false 0, yes 'Y', no 'N'</property>
  29.       <property name="proxyfactory.factory_class">
  30.          NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle
  31.        </property>
  32.         <property name="connection.release_mode">after_transaction</property>
  33.         <mapping assembly="NHibernate.Collection.Observable" />
  34.     </session-factory>
  35.    </hibernate-configuration>
  36.        
  37. if (NHibernateUtil.IsInitialized(ChildAssociations))
  38.                 {
  39.                     ChildAssociations.ForEach(x => isValid = isValid && x.Element.IsValid(validatedObjects));
  40.                 }
  41.        
  42. var cfg = new NHibernate.Cfg.Configuration().Configure();
  43. var sessionFactory = cfg.BuildSessionFactory();