NHibernate.Exceptions.GenericADOException: could not initialize a collection

751 views
Skip to first unread message

Anthony Nadar

unread,
Jan 5, 2015, 4:11:37 PM1/5/15
to nhu...@googlegroups.com
Is the bug "NHibernate.Exceptions.GenericADOException: could not initialize a collection" resolved?

We are not sure why this occurs, as per different forum comments, this seems to be related to session issues, while a entity is being used by one session, other session tries to access the same entity.

Is this how NHibernate is designed to work, or a fix is needed for this (if not fixed in earlier releases)?

Regards,
Anthony

Ricardo Peres

unread,
Jan 6, 2015, 4:43:58 AM1/6/15
to nhu...@googlegroups.com
It can have several causes:

- Invalid SQL used to load the collection;
- Invalid/wrong foreign keys specified in the mapping;
- The session that the entity was loaded from has been disposed while some of its lazy properties haven't been loaded;
- ...

Have a look at the InnerException, it may give more clues.

RP

Oskar Berggren

unread,
Jan 6, 2015, 5:14:40 PM1/6/15
to nhu...@googlegroups.com

Hi,

An exception is not a bug... Is there some specific issue you are referencing? Otherwise that exception just indicates that you are doing something inappropriate.

/Oskar

--
You received this message because you are subscribed to the Google Groups "nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nhusers+u...@googlegroups.com.
To post to this group, send email to nhu...@googlegroups.com.
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages