-->
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.  [ 2 posts ] 
Author Message
 Post subject: The 'type' attribute is not declared
PostPosted: Sat May 06, 2006 2:10 am 
Newbie

Joined: Fri May 05, 2006 4:54 am
Posts: 14
Hi! I get this exception. Can anybody help me?


Line 16: static HibernateHelper()
Line 17: {
Line 18: sessionFactory = new NHibernate.Cfg.Configuration().Configure().BuildSessionFactory();
Line 19: }
Line 20:

[XmlSchemaException: The 'type' attribute is not declared.]
NHibernate.Cfg.Configuration.ValidationHandler(Object o, ValidationEventArgs args) +7
System.Xml.Schema.BaseValidator.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity) +58
System.Xml.Schema.XsdValidator.ValidateStartElement() +837
System.Xml.Schema.XsdValidator.ProcessElement(Object particle) +338
System.Xml.Schema.XsdValidator.ValidateElement() +192
System.Xml.Schema.XsdValidator.Validate() +68
System.Xml.XmlValidatingReaderImpl.ProcessCoreReaderEvent() +125
System.Xml.XmlValidatingReaderImpl.Read() +44
System.Xml.XmlValidatingReader.Read() +12
System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) +789
System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) +51
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +278
System.Xml.XmlDocument.Load(XmlReader reader) +97
NHibernate.Cfg.Configuration.LoadMappingDocument(XmlTextReader hbmReader) +178
NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) +64

[MappingException: The 'type' attribute is not declared.]
NHibernate.Cfg.Configuration.AddInputStream(Stream xmlInputStream) +173
NHibernate.Cfg.Configuration.AddAssembly(Assembly assembly, Boolean skipOrdering) +243
NHibernate.Cfg.Configuration.AddAssembly(String assemblyName) +158
NHibernate.Cfg.Configuration.DoConfigure(XmlDocument doc) +618
NHibernate.Cfg.Configuration.Configure(XmlTextReader reader) +296
NHibernate.Cfg.Configuration.Configure(String resource) +65
NHibernate.Cfg.Configuration.Configure() +44
HibernateHelper..cctor() in C:\jobb\vs2005 projects\Com\Com.DataAccess\HibernateHelper.cs:18

[TypeInitializationException: The type initializer for 'HibernateHelper' threw an exception.]
HibernateHelper.GetCurrentSession() in C:\jobb\vs2005 projects\Com\Com.DataAccess\HibernateHelper.cs:33
Com.DataAccess.ContactHandler.SaveContact(String firstName, String lastName, String email, String telephone) in C:\jobb\vs2005 projects\Com\Com.DataAccess\ContactHandler.cs:55
AddressBook.Button1_Click(Object sender, EventArgs e) +54
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +98
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919


Top
 Profile  
 
 Post subject:
PostPosted: Sun May 07, 2006 8:07 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
You've put a 'type="???"' attribute on an element that doesn't support it. Check your mapping file against the DTD. It's probably something like a one-to-many (which uses class="???") or a key (which doesn't use anything to describe its type).

_________________
Code tags are your friend. Know them and use them.


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