0 Replies Latest reply on Aug 31, 2005 10:44 AM by Rian Kruger

    Connection handle is not currently associated with a Managed

    Rian Kruger Newbie

      Hi

      I am getting the following error erratically (stack trace at bottom of message).
      All our database access is being done using the HibernateTemplate (load, save, update) methods and the HibernateCallback api, we never ?open? or ?close? hibernate sessions ourselves.

      We are using spring v1.1, hibernate v2.1.6 and jboss v4.0.1.

      Some help would be much appreciated.

      Thanks in advance

      Rian



      org.springframework.jdbc.UncategorizedSQLException: (Hibernate operation): encountered SQLException [Connection handle is not

      currently associated with a ManagedConnection]; nested exception is java.sql.SQLException: Connection handle is not currently

      associated with a ManagedConnection

      java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection

      at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:741)

      at org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:721)

      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:274)

      at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

      at java.lang.reflect.Method.invoke(Unknown Source)

      at net.sf.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:39)

      at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:254)

      at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:61)

      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:525)

      at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:432)

      at net.sf.hibernate.impl.ScheduledIdentityInsertion.execute(ScheduledIdentityInsertion.java:29)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:932)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)

      at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)

      at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)

      at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388)

      at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)

      at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:952)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)

      at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)

      at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)

      at net.sf.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:1388)

      at net.sf.hibernate.engine.Cascades$4.cascade(Cascades.java:114)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:436)

      at net.sf.hibernate.engine.Cascades.cascadeCollection(Cascades.java:526)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:452)

      at net.sf.hibernate.engine.Cascades.cascade(Cascades.java:503)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:952)

      at net.sf.hibernate.impl.SessionImpl.doSave(SessionImpl.java:857)

      at net.sf.hibernate.impl.SessionImpl.saveWithGeneratedIdentifier(SessionImpl.java:775)

      at net.sf.hibernate.impl.SessionImpl.save(SessionImpl.java:738)

      at org.springframework.orm.hibernate.HibernateTemplate$11.doInHibernate(HibernateTemplate.java:301)

      at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:176)

      at org.springframework.orm.hibernate.HibernateTemplate.save(HibernateTemplate.java:298)

      at

      com.thawte.persistence.dao.hibernateImpl.EnrollmentDaoHibernateImpl.settleNonVpsRealtimeEnrollment(EnrollmentDaoHibernateImpl.j

      ava:1537)