Solved

NHibernate schema validation error in VS2005

Posted on 2007-04-06
1
966 Views
Last Modified: 2013-11-26
NHibernate Error within Visual Studio 2005

Message 1 Could not find schema information for the element 'urn:nhibernate-configuration-2.2:hibernate-configuration'.

How can I resolve this, it seems that Visual Studio 2005 does see the correct xsd file or it doesn't not of it at all.

I have added the following references
NHibernate.dll
log4j.net.dll
Nullables.dll

Here is the my Config.xml file


<?xml version="1.0" encoding="utf-8" ?>
<configuration>
 
    <!-- Add this element -->
    <configSections>
      <section
          name="hibernate-configuration"
          type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"
        />
    </configSections>



  <hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'      xmlns:xs='http://www.w3.org/2001/XMLSchema'>
    <session-factory>
      <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
      <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property>
      <property name="connection.connection_string">removed</property>
      <property name="show_sql">true</property>
      <property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
      <property name="use_outer_join">true</property>
      <mapping assembly="testassembly" />
    </session-factory>
  </hibernate-configuration>
</configuration>
0
Comment
Question by:jeffmc033
1 Comment
 
LVL 14

Accepted Solution

by:
existenz2 earned 500 total points
Comment Utility
Have a look at: http://forum.hibernate.org/viewtopic.php?t=970568&view=previous&sid=97bbb70f119269c4332ec9272b812e54

You need to change:
<hibernate-configuration xmlns='urn:nhibernate-configuration-2.2'      xmlns:xs='http://www.w3.org/2001/XMLSchema'>

to

<hibernate-configuration xmlns='urn:nhibernate-configuration-2.0'      xmlns:xs='http://www.w3.org/2001/XMLSchema'>

when you are using NHibernate 1.0.X, 2.2 is for 1.2
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now