Saturday, October 23, 2010

NHibernate troubleshooting a proper hbm.xml file

If you received this kind of error even though you are sure all your filenamehere.hbm.xml file has proper values...

Unhandled Exception: NHibernate.MappingException: Could not configure datastore from input stream AwesomeNHibernate.RecordCompanyDatabase.hbm.xml ---> System.Xml.XmlException: XML declaration cannot appear in this state. Line 2, position 40.

..., just remove all the white space before your <?xml version tag

No comments:

Post a Comment