Hello,
I've started using Hibernate Tools in Eclipse 3.1 M6. I am trying to generate a set of mappings & objects from a database schema, but am getting the below exception when I attempt to use the "Hibernate Artifact Generation".
I have tried setting the hibernate.connection.autocommit property to true, but this results in a 'SET CHAINED command not allowed within multi-statement transaction' exception instead.
Anyone have any ideas what is wrong?
[b]Hibernate version:[/b]
3.0.5
[b]Full stack trace of any exception that occurs:[/b]
org.hibernate.exception.GenericJDBCException: Reading from database
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:96)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
Caused by: com.sybase.jdbc2.jdbc.SybSQLException: The 'CREATE TABLE' command is not allowed within a multi-statement transaction in the 'tempdb' database.
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2416)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1852)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1401)
at com.sybase.jdbc2.jdbc.SybCallableStatement.executeQuery(SybCallableStatement.java:69)
at com.sybase.jdbc2.jdbc.SybDatabaseMetaData.returnResults(SybDatabaseMetaData.java:2284)
at com.sybase.jdbc2.jdbc.SybDatabaseMetaData.getPrimaryKeys(SybDatabaseMetaData.java:1966)
at org.hibernate.cfg.JDBCBinder.processPrimaryKey(JDBCBinder.java:941)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:124)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
... 8 more
[b]Name and version of the database you are using:[/b]
Sybase Adaptive Server Enterprise/12.5.0.1
|