Solved

NHibernate schema validation error in VS2005

Posted on 2007-04-06
1
972 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
ID: 18867704
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

895 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

15 Experts available now in Live!

Get 1:1 Help Now