Hi, I'm new to NHibernate. Actually I'm trying to save the values ffrom two text boxes into MySql Database in asp.Net page. I that I got "Resource not found: WebApplication1.Sample.hbm.xml" error. But I can't fix this error. Can anyone help me to fix this one?
+2
A:
That sounds like the error you get if you do not set your hbm's Build Action to Embedded Resource.
EDIT References to set to Copy Local = True
- Castle.Core
- Castle.DynamicProxy2
- Iesi.Collections
- NHibernate
- NHibernate.ByteCode.Castle
cmsjr
2010-03-23 18:49:57
Ya, tat problem fixed. But one more error arised tat "Object reference not set to an instance of an object." It shows in Textbox.
Siva
2010-03-23 19:56:59
That is probably being caused because you have one or more libraries that NHibernate references set to Copy Local = true. I'll post a list of what's working for me in a moment.
cmsjr
2010-03-23 20:23:21
Ya, I set NHibernate reference set to copy local= true. But still the same error
Siva
2010-03-24 04:12:51
It doesn't need to just be the Nhibernate reference, you need either all of the above referenced and set to copy local, or if not referenced, then in a directory your app can find. If that still doesn't do the trick your going to need to dig deeper into the exception details. There's probably an Inner exception with more detail.
cmsjr
2010-03-24 17:10:20
Now got another error tat "Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index" Its showing in textbox field
Siva
2010-03-25 15:26:16
Off the top of my head I'd say your trying to iterate over a collection with no members, or access one that doesn't exist. Can you post the code in question?
cmsjr
2010-03-25 17:13:39
Ya thanks cmsjr, I got tat.Actually I was trying to access the data which doesn't exit.. Nw got cleared
Siva
2010-03-27 08:06:37