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?
1 Answer
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
7 Comments
Siva
Ya, tat problem fixed. But one more error arised tat "Object reference not set to an instance of an object." It shows in Textbox.
cmsjr
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.
Siva
Ya, I set NHibernate reference set to copy local= true. But still the same error
cmsjr
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.
Siva
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
|