-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Cannot generate mappings with Hibernate plugin 3.0.0.alpha4
PostPosted: Tue Jun 28, 2005 8:57 am 
Newbie

Joined: Tue Jun 28, 2005 8:50 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Hibernate Tools with Sybase
PostPosted: Wed Jul 06, 2005 4:59 pm 
Beginner
Beginner

Joined: Wed Jul 06, 2005 4:51 pm
Posts: 27
I am facing a similar issue as well. Sybase docs says the following which aren't feasible in our case. Did you hear of any updates or have a work around? Hibernate Synchronizer didn't have this issue though.

------------------
The error is raised when ddl in tran is set to FALSE in tempdb. Use one of the following strategies to correct this error:


Use a permanent object name, so that tempdb is not affected.

Execute the command outside a multi-statement transaction.

Warning!

Using data definition language commands on tempdb within transactions may cause concurrency problems in tempdb. Always leave ddl in tran set to FALSE in tempdb
--------------

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:2846)

at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2168)

at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)

at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)

at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)

at com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1596)

at com.sybase.jdbc2.jdbc.SybCallableStatement.executeQuery(SybCallableStatement.java:102)

at com.sybase.jdbc2.jdbc.SybDatabaseMetaData.returnResults(SybDatabaseMetaData.java:2379)

at com.sybase.jdbc2.jdbc.SybDatabaseMetaData.getPrimaryKeys(SybDatabaseMetaData.java:2061)

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)

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)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.