View Full Version : Incomplete latest build of Spring.Data.NHibernate?
pathakn
01-03-2007, 08:53 AM
Hi Mark,
I just downloaded the latest of Spring.Data.NHibernate (1/2/2007) and it seems some of the files are missing or are referred w/o existence. For e.g.
1. HibernateAccessor
2. Hibernate Deletegate
and many more...
I don';t know but do I need the old Spring.Data.NHibernate project as well?
Mark Pollack
01-03-2007, 01:19 PM
Hi,
Did you download the NH 1.2 module? If so you need to also download the NH 1.0.x module since the project for NH 1.2 uses symbolic references to common files. You should install 1.0.x in a "parallel" directory structure. I have a todo item which is to add a build event to copy files from their "up and over" location as I don't want to add duplicate files into CVS. Sorry for the confusion, this is the second time this issue came up. I'll get on it. Let me know if you have any other issues. Thanks!
Mark
pathakn
01-04-2007, 04:35 AM
So are they going to live separately? Or there is a plan to merge them at some point in time?
And BTW if I don't need generic support - do I still need to get NH 1.2? Or I am better off using NH 1.0.x module
Regards,
-Nilesh
Mark Pollack
01-04-2007, 05:26 AM
Hi,
There will be different spring integration .dlls for NH 1.0.x and 1.2 support. The shared code will be better packaged to avoid the problem you are encountering. One of the reasons for the need for different integraiton .dlls is due to there being different NH .dlls and also different log4net dlls, which matters for strong signing of spring integration .dlls. Also log4net 1.2.9 (in NH1.2) uses a different key for signing the assembly than the prevous version of log4net (in NH 1.0). This is something which has caused many headaches and was the last straw for Spring to adopt a "common" logging package that provides a layer of indirection.
As for 1.0 vs 1.2, you should base that decision based on the NH feature set you need and the fact that 1.2 is in beta for .NET 2.0 only.
Mark
Paulvb
01-08-2007, 03:09 PM
Hi ,
I tried to setup all little test with Spring.net prev. 3 & Nhibernate 1.2. But get the following error:
[ObjectDefinitionStoreException: Error registering object with name 'SessionFactory' defined in 'file [c:\Visual Studio 2005\Projects\ISIZ.DemoApp\ISIZ.DemoApp.Web\ISIZ.D emoApp.DaoConfig.xml]' : Object class [Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate] not found.
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate" xmlns="http://www.springframework.net"><property name="DbProvider" ref="DbProvider" /><property name="MappingAssemblies"><list><value>ISIZ.DemoApp....]
Spring.Objects.Factory.Xml.XmlResourceReader.Repor tException(XmlNode node, String name, String message, Exception cause) +414
Spring.Objects.Factory.Xml.DefaultXmlObjectDefinit ionParser.ParseObjectDefinition(XmlElement element, String id, XmlResourceReader parser) +1778
Spring.Objects.Factory.Xml.WebObjectDefinitionPars er.ParseObjectDefinition(XmlElement element, String id, XmlResourceReader reader) +87
Spring.Objects.Factory.Xml.DefaultXmlObjectDefinit ionParser.ParseObjectDefinition(XmlElement element, XmlResourceReader parser) +284
Spring.Objects.Factory.Xml.DefaultXmlObjectDefinit ionParser.RegisterObjectDefinition(XmlElement element, XmlResourceReader parser) +64
Spring.Objects.Factory.Xml.DefaultXmlObjectDefinit ionParser.ParseElement(XmlElement element, XmlResourceReader parser) +171
Spring.Objects.Factory.Xml.XmlResourceReader.Regis terObjectDefinitions(XmlElement root) +371
Spring.Objects.Factory.Xml.XmlObjectDefinitionRead er.RegisterObjectDefinitions(XmlElement objectsElement, IResource resource) +74
Spring.Objects.Factory.Xml.XmlObjectDefinitionRead er.LoadObjectDefinitions(IResource resource) +540
Spring.Context.Support.AbstractXmlApplicationConte xt.LoadObjectDefinitions(XmlObjectDefinitionReader objectDefinitionReader) +156
Spring.Context.Support.AbstractXmlApplicationConte xt.RefreshObjectFactory() +128
Spring.Context.Support.AbstractApplicationContext. Refresh() +265
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) +96
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, String[] configurationLocations) +55
In my webapp i referenced the following files:
http://paul.preview.variabele.nl/paul/refs.jpg
This is from the nhibernate config file
<d:dbProvider id="DbProvider"
provider="System.Data.SqlClient"
connectionString="${db.datasource};Database=${db.database};User ID=${db.user};Password=${db.password};Trusted_Conn ection=False"/>
<object id="SessionFactory" type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate">
<property name="DbProvider" ref="DbProvider"/>
<property name="MappingAssemblies">
<list>
<value>ISIZ.DemoApp.Dao.NHibernate</value>
</list>
</property>
<property name="HibernateProperties">
<dictionary>
<entry key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"/>
<entry key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect"/>
<entry key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"/>
</dictionary>
</property>
</object>
Do i ref to the wrong assembly's? I used the latest builds to my knowledge..
Paul
Mark Pollack
01-08-2007, 03:23 PM
Hi,
I think this is a simple mistake.. instead of
<object id="SessionFactory"
type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate">
use
<object id="SessionFactory"
type="Spring.Data.NHibernate.LocalSessionFactoryObject, Spring.Data.NHibernate12">
i.e. replace Spring.Data.NHibernate with Spring.Data.NHibernate12 in the config file.
Very complete issue reporting BTW - thanks!
Cheers,
Mark
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.