-->
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.  [ 7 posts ] 
Author Message
 Post subject: XML validation error: Could find the xml schema
PostPosted: Thu Nov 15, 2007 8:53 am 
Newbie

Joined: Mon Nov 12, 2007 3:39 am
Posts: 1
Hi I am trying to use NHibernate in Web Application but I got the following error.Here Dummy is the assembly name

Dummy.domain.User.hbm.xml(2,2): XML validation error: Could not find schema information for the element 'urn:nhibernate-mapping-2.0:hibernate-mapping'.


Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 15, 2007 10:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
If you are using NHibernate 1.2, the schema version should be 2.2 (not 2.0)

_________________
Karl Chu


Top
 Profile  
 
 Post subject: Xml Validation Error
PostPosted: Fri Nov 16, 2007 12:24 am 
Newbie

Joined: Thu Nov 15, 2007 8:55 am
Posts: 4
Hi,
Im still got the same error even after changed urn:nhibernate-mapping-2.0 to urn:nhibernate-mapping-2.2.Please help on the same.

thanks,
Bala


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 1:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
Please post you mapping file and exception stack trace in a new thread. Need mapping and exception stack trace because it is hard to help with no information. New thread because you can give credit to whoever end up helping you.

_________________
Karl Chu


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 1:36 am 
Newbie

Joined: Thu Nov 15, 2007 8:55 am
Posts: 4
hi Karl,
Thanks for showing interest on this.i posted the mapping file below

<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="Dummy.domain.User, Dummy" table="users">
<id name="Id" column="UserId" type="String" length="20">
<generator class="assigned" />
</id>
<property name="Name" column="Name" type="String"/>
<property name="Password" type="String"/>
<bag name="Transactions" lazy="true">
<key column="UserId" />
<one-to-many class="Dummy.domain.Transaction, Dummy" />
</bag>
</class>
</hibernate-mapping>

above file is User.hbm.xml

thanks in advance,
Bala


Top
 Profile  
 
 Post subject: Any sample for Nhibernate with ASP.NET
PostPosted: Fri Nov 16, 2007 4:36 am 
Newbie

Joined: Thu Nov 15, 2007 8:55 am
Posts: 4
hi,
i want the sample application for nhibernate in ASP.NET.Please help on the same.
thanks,
bala


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 16, 2007 9:06 am 
Hibernate Team
Hibernate Team

Joined: Tue Jun 13, 2006 11:29 pm
Posts: 315
Location: Calgary, Alberta, Canada
The mapping file looks good; I don't see anything obviously wrong with it. What version of NHibernate are you using? Did you use a distributed binary or did you build you own?

_________________
Karl Chu


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