AbstractLazyInitializer.initialize() can throw LazyInitializationExceptions:
{code:java} if (this.session == null) { throw new LazyInitializationException("could not initialize proxy - no Session"); }
if (!this.session.isOpen()) { throw new LazyInitializationException("could not initialize proxy - the owning Session was closed"); }
if (!this.session.isConnected()) { throw new LazyInitializationException("could not initialize proxy - the owning Session is disconnected"); } {code} I think it would greatly make debugging easier when entityName and ID of the entity would be included in all lazyinitialization exceptions exception messages to give a clue in the right direction. |
|