warn « Connection « JPA Q&A





1. WARNING: unclosed connection and autoClose    forum.hibernate.org

Hi, I have a project built around hibernate 2.0.1. Things were going well until we did a series of updates to our CVS repository that resulted in hibernate pitching a lot of "WARNING: unclosed connection" messages. These connections then gobble up all the available connections in the pool and lock up the system, I have to restart Tomcat. Has anyone out ...

2. "Unclosed Connection" warning from finalize() meth    forum.hibernate.org

The finalize method in the struts sessionImpl logs an "unclosed connection" warning in this JSP application I have running in Tomcat. I use C3p0 for connection pooling and obviously if I close the connection myself it will break the application. Has anyone out there ever encountered this? My Oracle server confirms that these connections are left open and inactive after I'm ...

3. update warning: unclosed connection: Timing problem?    forum.hibernate.org

I use Hibernate 3 Beta and have the following method to insert objects. public synchronized long create(Persistable obj) throws IOException { long id = -1; try { Session session = sessionFactory.openSession(); Transaction tx = session.beginTransaction(); id = ((Long)session.save(obj)).longValue(); logger.warn("crea1"); tx.commit(); session.close(); logger.warn("crea2"); } catch(Exception ex) { throw new IOException("Error creating object:" + obj + "\r\n" + ex.toString()); } return id; } ...

4. unclosed connection warnings    forum.hibernate.org

5. warning: unclosed connection    forum.hibernate.org

private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory(); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed log.error("Initial SessionFactory creation failed.", ex); throw new ExceptionInInitializerError(ex); } } public static Session currentSession() throws HibernateException { Session s = sessionFactory.openSession(); return s; } public static void ...

6. Warning finalizing with closed connection    forum.hibernate.org

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 ...