These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Casteproject NHibernate 2alpha1 build question
PostPosted: Fri Jun 13, 2008 3:13 pm 
Newbie

Joined: Sat Mar 15, 2008 11:12 am
Posts: 4
Hi,

I'm trying to use the castle project (subversion) and nhibernate 2a1 (subversion). But I can get it to work properly.

I've downloaded the latest nhibernate source and used the following build command:

NAnt -D:project.config=release clean build >output-release-build.log

The build finished with 3 warnings and no errors. When I use the binary in my castle project I get the following exception:

System.InvalidOperationException: Could not find the dialect in the configuration

The projects nhibernate settings are:

<activerecord isWeb="true">
<config>
<add
key="hibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver" />
<add
key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2005Dialect" />
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider" />
<add
key="hibernate.connection.connection_string"
value="Server=EMPTY\SQWUUL2K5;Initial Catalog=nhibernate;User Id=sa;Password=p@$$w0r7" />
</config>
</activerecord>

Because I received this exception, I tried to test the nhibernate build with the following command:

NAnt -D:project.config=release -D:nhibernate.diale
ct="NHibernate.Dialect.MsSql2005Dialect" -D:nhibernate.connection.driver_class="
NHibernate.Driver.SqlClientDriver" -D:nhibernate.connection.connection_string="S
erver=EMPTY\SQWUUL2K5;Initial Catalog=nhibernate;User Id=sa;Password=p@$$w0r7" t
est >output-release-test.log

The log file contains the following (multiple times):
[property] Read-only property "nhibernate.dialect" cannot be overwritten.
[property] Read-only property "nhibernate.connection.driver_class" cannot be overwritten.
[property] Read-only property "nhibernate.connection.connection_string" cannot be overwritten.

and then a lot of stacktraces starting with "could not connect to server... etc".


Any idea what could be the problem?


Regards,
DarnDao


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 13, 2008 5:15 pm 
Newbie

Joined: Sat Mar 15, 2008 11:12 am
Posts: 4
I used the instructions from the following site to build Castle and NHibernate:

[url]http://wiki.bittercoder.com/(X(1)S(jlnoye55id1ftq2uxnk2nf45))/Default.aspx?Page=CastleStackFromTrunk&AspxAutoDetectCookieSupport=1[/url]

I think I've got a better build than the previous one. When I start my web app the following error is shown:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Line 720: try
Line 721: {
Line 722: config.AddXmlString(xml);
Line 723: }
Line 724: catch(Exception ex)


Source File: .....\ActiveRecordStarter.cs Line: 722

[KeyNotFoundException: The given key was not present in the dictionary.]
System.ThrowHelper.ThrowKeyNotFoundException() +28
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +2668548
NHibernate.Dialect.Dialect.GetDialect(IDictionary`2 props) +123
NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) +144

[MappingException: Could not compile the mapping document: (string)]
NHibernate.Cfg.Configuration.LogAndThrow(Exception exception) +107
NHibernate.Cfg.Configuration.AddValidatedDocument(NamedXmlDocument doc) +307
NHibernate.Cfg.Configuration.ProcessMappingsQueue() +57
NHibernate.Cfg.Configuration.AddDocumentThroughQueue(NamedXmlDocument document) +57


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.