Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
[b]Hibernate version:[/b]
[b]Mapping documents:[/b]
[b]Code between sessionFactory.openSession() and session.close():[/b]
[b]Full stack trace of any exception that occurs:[/b]
[b]Name and version of the database you are using:[/b]
[b]The generated SQL (show_sql=true):[/b]
[b]Debug level Hibernate log excerpt:[/b]
Hi
I was getting a lazy initialization exception since I tried to use my object after I closed the connection so I am now using a servlet filter to close my connection but I get the error
WARN [ConnectionManager] finalizing with closed connection
From here
/**
369 * Just in case user forgot to commit()/cancel() or close()
370 */
371 protected void finalize() throws Throwable {
372
373 log.debug( "running Session.finalize()" );
374
375 if ( connection != null ) {
376 if ( connection.isClosed() ) {
377 log.warn( "finalizing with closed connection" );
378 }
379 else {
380 log.warn("unclosed connection, forgot to call close() on your session?");
381 // TODO : Should we also call batcher.closeStatements() from here?
382 if ( !wasConnectionSupplied ) {
383 connection.close();
384 }
385 }
386 }
387 }
388 }
I understand that my connection already closed do I need to make it null or something......am I doing something wrong.....
Regards
Pri