Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-10395

PooledConnection has already been closed exception with Hibernate 4.2

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3, 4.0 M1
    • Component/s: Data:ORM
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      When using Spring's JdbcTemplate inside a transactional-service with the JpaTransactionmanager and the HibernateJpaDialect an exception is thrown.

      Using Hibernate-4.2.0.Final, JPA, Spring-3.2.2 and I get:

      Caused by: java.sql.SQLException: PooledConnection has already been closed.
              at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:86)
              at com.sun.proxy.$Proxy19.commit(Unknown Source)
              at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doCommit(JdbcTransaction.java:112)
              ... 44 more
      

      This happens both with c3p0 and tomcat-pool that comes with tomcat7.

      I've tested in two projects with the same results. This doesn't happen with Hibernate-4.1.x

      I know i should provide a test-case but I only have a scala-project at hand and you probably want that out of the equation...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                andreak Andreas Joseph Krogh
                Last updater:
                Ramesh Samarasam
              • Votes:
                6 Vote for this issue
                Watchers:
                12 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  3 years, 49 weeks, 1 day ago