7 Replies Latest reply on Dec 12, 2005 11:17 AM by Brian Stafford

    Hibernate IDE Postgres 8.0 AUTOCOMMIT exception

    Brian Stafford Newbie

      I am running the bundled version of Eclipse w/ JBoss IDE - 1.5rc1. When I try to reverse engineer w/ Hibernate it complains that

      org.hibernate.exception.GenericJDBCException: Reading from database
      org.hibernate.exception.GenericJDBCException: Reading from database
      java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

      I have tried all the JDBC drivers (2,3, j2ee) for version 8.0.311 with no luck. Also, I tried setting the autocommit property in the hibernate.cfg to false, but didn't make a difference. I realize that 7.4 eliminated server side autocommits, but how do I get past this.

      Any thoughts??

      Thanks.

        • 1. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
          Max Rydahl Andersen Master

          what is the database ? And why do you need autocommit off ?

          And what is 7.4 ?

          • 2. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
            Max Rydahl Andersen Master

            sorry - did not see title ;)

            what is the full stacktrace ?

            • 3. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
              Brian Stafford Newbie

              Sorry not to give you more details. This error is coming when I go to file -> New -> Other -> Hibernate Artifact Generation. I have already set up a Hibernate Console Configuration, set the output directory, check reverse from JDBC, name a package, and check (generate composite ids, gnerate doamin code, DOA, mappings)

              The error is an IDE error with the title of Hiberate Console - Error under artifact generation. This is followed by
              org.hibernate.exception.GenericJDBCException: Reading from database
              org.hibernate.exception.GenericJDBCException: Reading from database
              java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

              I am using Postres 8.0.3 and I tried all relevant JDBC drivers.

              Is it possible to grab a larger stack trace from the IDE and how?

              Thanks.

              • 5. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
                Brian Stafford Newbie

                !ENTRY org.hibernate.eclipse 2 30000 2005-12-12 09:34:43.80
                !MESSAGE WARN ModalContext org.hibernate.cfg.SettingsFactory - Could not obtain connection metadata
                !STACK 0
                java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
                at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:72)
                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1815)
                at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:38)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(Unknown Source)
                at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
                at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(Unknown Source)
                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

                !ENTRY org.hibernate.eclipse.console 4 4 2005-12-12 09:34:43.120
                !MESSAGE Error under artifact generation
                !STACK 0
                org.hibernate.exception.GenericJDBCException: Reading from database
                at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91)
                at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79)
                at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:93)
                at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(Unknown Source)
                at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
                at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(Unknown Source)
                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
                Caused by: java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
                at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
                at org.hibernate.cfg.JDBCBinder.getConnnection(JDBCBinder.java:636)
                at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120)
                at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
                ... 9 more
                !SUBENTRY 1 org.hibernate.eclipse.console 4 150 2005-12-12 09:34:43.120
                !MESSAGE java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                !STACK 0
                java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
                at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
                at org.hibernate.cfg.JDBCBinder.getConnnection(JDBCBinder.java:636)
                at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120)
                at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
                at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(Unknown Source)
                at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
                at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(Unknown Source)
                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
                !SUBENTRY 2 org.hibernate.eclipse.console 4 150 2005-12-12 09:34:43.120
                !MESSAGE java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                !STACK 0
                java.sql.SQLException: ERROR: SET AUTOCOMMIT TO OFF is no longer supported

                at org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:482)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:461)
                at org.postgresql.jdbc1.AbstractJdbc1Connection.setAutoCommit(AbstractJdbc1Connection.java:957)
                at org.hibernate.connection.DriverManagerConnectionProvider.getConnection(DriverManagerConnectionProvider.java:112)
                at org.hibernate.cfg.JDBCBinder.getConnnection(JDBCBinder.java:636)
                at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:120)
                at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:88)
                at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(Unknown Source)
                at org.hibernate.console.execution.DefaultExecutionContext.execute(Unknown Source)
                at org.hibernate.console.ConsoleConfiguration.execute(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(Unknown Source)
                at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(Unknown Source)
                at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

                • 6. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
                  Max Rydahl Andersen Master

                  googling for it and asking around tells me that it is just some wrong jdbc driver problem.

                  • 7. Re: Hibernate IDE Postgres 8.0 AUTOCOMMIT exception
                    Brian Stafford Newbie

                    Rookie mistake. When I was updating the JDBC driver, I was just changing it in the BuildPath and not in the console configuration. So an old driver was in the classpath of the console. After that, it work fine.

                    Thanks for your help.