Solved

NHibernate schema validation error in VS2005

Posted on 2007-04-06
1
983 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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