I am so stuck trying to run the NHibernate app. I am doing "Getting Started with NHibernate" step by step. Firstly, I got an invalid property, something was an error (I managed to fix it).
Now I get an exception:
Unable to load type 'NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle' while setting up the factory proxy class.
Possible reasons : - The NHibernate.Bytecode provider node has not been deployed. - TypeName used to initialize the proxyfactory.factory_class property in the session-factory section is not formed correctly.
Solution:
Make sure your deployment folder contains one of the following assemblies: NHibernate.ByteCode.LinFu.dll NHibernate.ByteCode.Castle.dll "
The specified files are located in the Bin folder where QuickStart.dll is located. I have no idea why this is happening! Today I am on my mind, spending hours trying to get this to work. Question in SO ( Failed to load type 'NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu ) did not help: (
Hibernate configuration from Web.config:
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
<property name="connection.connection_string">Server=(local);initial catalog=quickstart;Integrated Security=SSPI</property>
<property name="connection.isolation">ReadCommitted</property>
<property name="default_schema">Monitor.dbo</property>
<property name='proxyfactory.factory_class'>NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
<mapping assembly="QuickStart"/>
</session-factory>
</hibernate-configuration>
source
share