Hi,

Im playing around with NHibernate 3 alpha but struggling to set up my
SessionFactory.

I have the following:

 var config = new Configuration().Configure();
 _sessionFactory = config.BuildSessionFactory();

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.

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.

So, my hibernate.cfg.xml has

<property
name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory,
NHibernate.ByteCode.LinFu</property>
With the second line failing with of the above code failing when
creating the Factory

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

But, the LinFu ref is set to CopyLocal, and delving deeper into the
stacktrace this gives:

at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&
rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean
isOperationContextSet) InnerException: System.IO.FileLoadException
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 ===

LOG: DisplayName = NHibernate, Version=3.0.0.1002, Culture=neutral,
PublicKeyToken=null (Fully-specified)
LOG: Appbase = 
file:///C:/Dev/SilverTracker/src/SilverTracker/SilverTracker.Web.Services/
LOG: Initial PrivatePath = >C:\Dev\SilverTracker\src\SilverTracker
\SilverTracker.Web.Services\bin
Calling assembly : NHibernate.ByteCode.LinFu, Version=3.0.0.1002,
Culture=neutral, PublicKeyToken=null.

And the inner execption itself:

{"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"}

So as far as I can see its found the file, but its not compatable with
the nHib 3 assembly.

So, im at a bit of a loss!

Has the config changed for 3? Im struggling to find any other examples
bar the ones provided with the 3 assemblies.

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.

Thanks in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to