Note that there are some explanatory texts on larger screens.

plurals
  1. PONHibernate 3 Alpha - proxyfactory.factory_class?
    primarykey
    data
    text
    <p>Im playing around with NHibernate 3 alpha but struggling to set up my SessionFactory.</p> <p>I have the following:</p> <pre><code> var config = new Configuration().Configure(); _sessionFactory = config.BuildSessionFactory(); </code></pre> <p>However, in the provided dlls with the 3 alpha download there are no provided proxy factory classes. Ie NHibernate.ByteCode.Castle, NHibernate.ByteCode.LinFu, and the Spring ones provided with nHib 2.x are not provided here. </p> <p>So within the 3 alpha package, i looked at the NHibernate.Example.Web and used its provided NHibernate.ByteCode.LinFu; this example is using it within its config.hbm.</p> <p>So, my hibernate.cfg.xml has</p> <pre><code>&lt;property name="proxyfactory.factory_class"&gt;NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu&lt;/property&gt; </code></pre> <p>With the second line failing with of the above code failing when creating the Factory</p> <blockquote> <p>NHibernate.Bytecode.UnableToLoadProxyFactoryFactoryException was unhandled by user code Message=Unable to load type 'NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu' during configuration of proxy factory class. Possible causes are: - The NHibernate.Bytecode provider assembly was not deployed. - The typeName used to initialize the 'proxyfactory.factory_class' property of the >session-factory section is not well formed</p> </blockquote> <p>But, the LinFu ref is set to CopyLocal, and delving deeper into the stacktrace this gives:</p> <blockquote> <p>at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&amp; rpc) <br /> at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) InnerException: System.IO.FileLoadException <br /> Message=Could not load file or assembly 'NHibernate, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) Source=mscorlib FileName=NHibernate, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null FusionLog==== Pre-bind state information ===</p> <p>LOG: DisplayName = NHibernate, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null (Fully-specified) <br /> LOG: Appbase = file:///C:/Dev/SilverTracker/src/SilverTracker/SilverTracker.Web.Services/ <br /> LOG: Initial PrivatePath = >C:\Dev\SilverTracker\src\SilverTracker\SilverTracker.Web.Services\bin <br /> Calling assembly : NHibernate.ByteCode.LinFu, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null.</p> </blockquote> <p>And the inner execption itself:</p> <blockquote> <p>{"Could not load file or assembly 'NHibernate, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"NHibernate, Version=3.0.0.1002, Culture=neutral, PublicKeyToken=null"}</p> </blockquote> <p>So as far as I can see its found the file, but its not compatable with the nHib 3 assembly.</p> <p>So, im at a bit of a loss! </p> <p>Has the config changed for 3? Im struggling to find any other examples bar the ones provided with the 3 assemblies.</p> <p>This is a .NET 4.0 WCF service. Im aware I could just use 2.x but im trying out the new linq provider niceness.</p> <p>Thanks in advance.</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