Note that there are some explanatory texts on larger screens.

plurals
  1. PONhibernate.Util causing ProxyFactoryFactoryNotConfiguredException when configuration line exists in config
    primarykey
    data
    text
    <p>We're building a project using NHibernate and Castle with the Validators project. I'm trying to upgrade it to the latest supported version between all of those. I've gotten the application working without errors, but I'm getting the exception below in a few of my unit tests. These are tests that don't actually touch the database in any way, but test functionality around the mapped entities.</p> <pre><code> NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException: 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: &lt;property name='proxyfactory.factory_class'&gt; NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu &lt;/property&gt; Example: &lt;property name='proxyfactory.factory_class'&gt; NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle &lt;/property&gt; [Continues down stack trace...] </code></pre> <p>Below is my config file:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" &gt; &lt;session-factory name="Linx2"&gt; &lt;property name="connection.driver_class"&gt;NHibernate.Driver.NpgsqlDriver&lt;/property&gt; &lt;property name="dialect"&gt;Linx2.Common.Framework.PostgreSQL83Dialect, Linx2.Common.Framework&lt;/property&gt; &lt;property name="connection.connection_string"&gt;[Hidden so I don't get fired.]&lt;/property&gt; &lt;property name="adonet.batch_size"&gt;10&lt;/property&gt; &lt;property name="show_sql"&gt;false&lt;/property&gt; &lt;property name="use_outer_join"&gt;true&lt;/property&gt; &lt;property name="command_timeout"&gt;60&lt;/property&gt; &lt;property name="query.substitutions"&gt;true 1, false 0, yes 'Y', no 'N'&lt;/property&gt; &lt;property name="proxyfactory.factory_class"&gt; NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle &lt;/property&gt; &lt;property name="connection.release_mode"&gt;after_transaction&lt;/property&gt; &lt;mapping assembly="NHibernate.Collection.Observable" /&gt; &lt;/session-factory&gt; &lt;/hibernate-configuration&gt; </code></pre> <p>I have the config mapping there, and it works in the application. I'm also including the NHibernate.ByteCode dll. However, in these tests it is ignored. I've tried manually starting the configuration in individual test and even stopped and confirmed mid-test that the configuration has the item. However, the exception is thrown in the code below on the IsInitialized call.</p> <pre><code> if (NHibernateUtil.IsInitialized(ChildAssociations)) { ChildAssociations.ForEach(x =&gt; isValid = isValid &amp;&amp; x.Element.IsValid(validatedObjects)); } </code></pre> <p>This worked previously with no problems in NHibernate build for 2.2. Any help would be greatly appreciated. I've been beating my head on it for the last 4 hours.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload