0 Replies Latest reply on Sep 29, 2005 8:43 PM by mrtaco00

    autocommit issue with JBoss 3.2.6 Datasource, Hibernate 2.1.

    mrtaco00

      Hi,

      I have a webapp whose persistence layer is provided by hibernate. the sessionfactory's datasource is configured via spring and is configured in a standard oracle9i -ds.xml file.

      in our spring configuration file for the hibernate session factory, i have this property set:


      <property name="hibernateProperties">
      <props>
      ...
      <prop key="hibernate.connection.autocommit">false
      ...
      </props>
      </property>


      however, when i execute session.commit() in my DAO implementation, i get the following exception. i've used this same pattern in apps (but not this specific app) deployed on tomcat and weblogic. i didnt see a bug entry in jboss's JIRA. anyone know if I'm missing a config setting somewhere?

      thanks in advance,
      t


      Caused by: java.sql.SQLException: You cannot commit with autocommit set!
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:527)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:473)
      at com.cauldron.framework.dao.hibernate.SpringHibernateDAOSupportImpl.createObject(SpringHibernateDAOSupportImpl.java:408)
      ... 54 more