-->
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.  [ 3 posts ] 
Author Message
 Post subject: Index creation on PK (Hibernate3, Gupta SQL Base)
PostPosted: Mon Jan 24, 2005 2:12 pm 
Newbie

Joined: Thu Jan 13, 2005 1:24 pm
Posts: 4
All,

I am in the process of creating a dialect to communicate with Gupta SQLbase database. Currently I am facing a problem of "Table in incomplete state". According to Gupta this problem is caused by a missing index on the primary key. This appears to be correct since there are no indexes created on my table (NOTATION), once the SchemaExport runs. I have tested the same mapping documents and identical code on MSSQL Server, using the provided dialect (SQLServerDialect) and there are no problems with index creation. This is due to the fact that indexes on primary key are created implicitly under such DBs as Oracle and MSSQL Server. Unfortunately this is not the case with Gupta SQL Base, where the index must be created explicitly. Hence my question:

Since this problem is DB specific, any ideas on how to incorporate functionality to force explicit index creation on PK, after table generation?

As I understand it I am faced with extending:

org.hibernate.mapping.Table
org.hibernate.dialect.Dialect
+ my own dialect

I have less then a month of exposure with Hibernate so there are probably many misconceptions in the above. Please correct me if you see anything wrong.

Also this looks like a "borderline" developer question. If it needs to be moved, just tell me.


Thanks,

Sergei




************************RELEVANT INFORMATION**************
Hibernate version: Hibernate3

Full stack trace of any exception that occurs:

Quote:
[java] 12:19:02,110 DEBUG SQL:290 - insert into NOTATION (NOTE, TYPE, OWNER_ID, CREATE_DATE) values (?, ?, ?, ?)
[java] Hibernate: insert into NOTATION (NOTE, TYPE, OWNER_ID, CREATE_DATE) values (?, ?, ?, ?)
[java] 12:19:02,110 DEBUG AbstractBatcher:341 - preparing statement
[java] 12:19:02,157 DEBUG JDBCExceptionReporter:49 - SQL Exception
[java] java.sql.SQLException: 01417 DLU TIC Table in incomplete state

[java] at jdbc.gupta.sqlbase.SqlbaseStatement.SQLException(SqlbaseStatement.java:826)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:147)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:92)
[java] at jdbc.gupta.sqlbase.SqlbaseConnection.prepareStatement(SqlbaseConnection.java:195)
[java] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:349)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:71)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:65)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:125)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1653)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:2006)
[java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:42)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)
[java] at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:255)
[java] at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:75)
[java] at org.hibernate.auction.Main.createNotation(Main.java:127)
[java] at org.hibernate.auction.Main.main(Main.java:425)
[java] 12:19:02,173 WARN JDBCExceptionReporter:57 - SQL Error: 0, SQLState: null
[java] 12:19:02,173 ERROR JDBCExceptionReporter:58 - 01417 DLU TIC Table in incomplete state
[java] 12:19:02,188 DEBUG JDBCExceptionReporter:49 - could not insert: [org.hibernate.auction.Notation] [insert into NOTATION (NOTE, T
YPE, OWNER_ID, CREATE_DATE) values (?, ?, ?, ?)]
[java] java.sql.SQLException: 01417 DLU TIC Table in incomplete state
[java] at jdbc.gupta.sqlbase.SqlbaseStatement.SQLException(SqlbaseStatement.java:826)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:147)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:92)
[java] at jdbc.gupta.sqlbase.SqlbaseConnection.prepareStatement(SqlbaseConnection.java:195)
[java] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:349)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:71)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:65)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:125)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1653)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:2006)
[java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:42)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)
[java] at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:255)
[java] at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:75)
[java] at org.hibernate.auction.Main.createNotation(Main.java:127)
[java] at org.hibernate.auction.Main.main(Main.java:425)
[java] 12:19:02,282 WARN JDBCExceptionReporter:57 - SQL Error: 0, SQLState: null
[java] 12:19:02,282 ERROR JDBCExceptionReporter:58 - 01417 DLU TIC Table in incomplete state
[java] 12:19:02,282 ERROR AbstractFlushingEventListener:258 - Could not synchronize database state with session
[java] org.hibernate.exception.GenericJDBCException: could not insert: [org.hibernate.auction.Notation]
[java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1683)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:2006)
[java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:42)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)
[java] at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:255)
[java] at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:75)
[java] at org.hibernate.auction.Main.createNotation(Main.java:127)
[java] at org.hibernate.auction.Main.main(Main.java:425)
[java] Caused by: java.sql.SQLException: 01417 DLU TIC Table in incomplete state
[java] at jdbc.gupta.sqlbase.SqlbaseStatement.SQLException(SqlbaseStatement.java:826)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:147)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:92)
[java] at jdbc.gupta.sqlbase.SqlbaseConnection.prepareStatement(SqlbaseConnection.java:195)
[java] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:349)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:71)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:65)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:125)
[java] Exception in thread "main" org.hibernate.exception.GenericJDBCException: could not insert: [org.hibernate.auction.Notation]
[java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
[java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
[java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1683)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:2006)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1653)
[java] ... 10 more
[java] 12:19:02,407 DEBUG JDBCTransaction:99 - rollback
[java] 12:19:02,423 DEBUG SessionImpl:363 - transaction completion
[java] 12:19:02,423 DEBUG SessionImpl:232 - closing session
[java] 12:19:02,423 DEBUG SessionImpl:311 - disconnecting session
[java] 12:19:02,423 DEBUG AbstractBatcher:392 - closing JDBC connection (open PreparedStatements: 1, globally: 1) (open ResultSets: 0,
globally: 0)
[java] 12:19:02,423 DEBUG DriverManagerConnectionProvider:129 - returning connection to pool, pool size: 1
[java] 12:19:02,423 DEBUG SessionImpl:363 - transaction completion
[java] at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:42)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)
[java] at org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)
[java] at org.hibernate.event.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:255)
[java] at org.hibernate.event.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:26)
[java] at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:814)
[java] at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:75)
[java] at org.hibernate.auction.Main.createNotation(Main.java:127)
[java] at org.hibernate.auction.Main.main(Main.java:425)
[java] Caused by: java.sql.SQLException: 01417 DLU TIC Table in incomplete state
[java] at jdbc.gupta.sqlbase.SqlbaseStatement.SQLException(SqlbaseStatement.java:826)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:147)
[java] at jdbc.gupta.sqlbase.SqlbasePreparedStatement.<init>(SqlbasePreparedStatement.java:92)
[java] at jdbc.gupta.sqlbase.SqlbaseConnection.prepareStatement(SqlbaseConnection.java:195)
[java] at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:349)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:71)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:65)
[java] at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:125)
[java] at org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersister.java:1653)
[java] ... 10 more

BUILD FAILED
C:\java\eclipse\workspace\HibernateSQLBase\build.xml:624: Java returned: 1


Name and version of the database you are using: Gupta SQL Base 7.6.0

The generated SQL (show_sql=true):
Quote:
[java] 12:19:01,751 DEBUG SchemaExport:154 - create table NOTATION (
[java] TYPE varchar(2) not null,
[java] OWNER_ID varchar(40) not null,
[java] CREATE_DATE date not null,
[java] NOTE LONG VARCHAR,
[java] primary key (TYPE, OWNER_ID, CREATE_DATE)
[java] )


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 11:59 am 
Newbie

Joined: Thu Feb 23, 2006 9:52 am
Posts: 3
Hi,

have you create a dialect for SqlBase?


kind regards,

F.O.


Top
 Profile  
 
 Post subject: Re: Index creation on PK (Hibernate3, Gupta SQL Base)
PostPosted: Mon Nov 22, 2010 5:39 am 
Newbie

Joined: Mon Nov 22, 2010 5:26 am
Posts: 9
Hi,

I'm looking at implementing NHibernate with SQLBase. Is there any code you can post that might help me out?

Thanks.

Mike.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.