-->
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.  [ 3 posts ] 
Author Message
 Post subject: Could not find schema warnings in VS 2005
PostPosted: Mon Jul 23, 2007 5:42 pm 
Newbie

Joined: Fri Jul 20, 2007 7:45 pm
Posts: 12
Location: Amgen Corp
Hi,

I'm new to [N]Hibernate. I've been playing with cats, adding complexity to my toy program. So far I've overcome all problems. There is an irritating set of warning messages that pop up when I build in MS Studio 2005 (SP1). They all relate to the namespace "urn:nhibernate-configuration-2.2" which prefixes the hibernate-specific elements added to the web.config file.

"Could not find schema information for the attribute/element urn:nhibernate-configuration-2.2: ...."

I googled and found a fix here:
http://fgheysels.blogspot.com/2006/04/n ... chema.html

But the only way the fix works is to put an include statement into DotNetConfig.xsd as the second line of the file, which makes the file unreadable by an XML editor.

I suspect there is another way to get rid of these messages.

I noticed an earlier post in this forum where a different syntax was suggested. I'm using the (working) syntax right from page 1 of the 1.2 Reference:

<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string"> Server="localhost\SQLEXPRESS";initial catalog=quickstart;Integrated Security=SSPI</property>
<mapping assembly="Quickstart"/>
</session-factory>
</hibernate-configuration>

Thanks

_________________
Fred Stann
Solutions Architect


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2007 6:46 pm 
Beginner
Beginner

Joined: Tue Jul 19, 2005 11:21 am
Posts: 23
Location: erie, pa
Grab the three *.xsd files from https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk/nhibernate/src/NHibernate and put them into C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas or wherever you have it installed.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 23, 2007 7:24 pm 
Newbie

Joined: Fri Jul 20, 2007 7:45 pm
Posts: 12
Location: Amgen Corp
Hi Jimbolla,

That did the trick. Boy, I love this forum!

Cheers :)

_________________
Fred Stann
Solutions Architect


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.