-->
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.  [ 8 posts ] 
Author Message
 Post subject: [hibernate 3.0 beta2] Broken Derby dialect support
PostPosted: Tue Jan 25, 2005 12:36 pm 
Newbie

Joined: Tue Jan 25, 2005 12:25 pm
Posts: 9
I've upgraded my application from 3.0beta1 to 3.0beta2 and i got many errors that before i havent. I am using Apache Derby database. I got this exception:

ERROR [main] could not get database metadata

ERROR 42X05: Table 'SYSIBM.SYSSEQUENCES' dont exists.

at org.apache.derby.iapi.error.StandardException.newException(StandardException.java)

at org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(FromBaseTable.java)

at org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(FromBaseTable.java)

at org.apache.derby.impl.sql.compile.FromList.bindTables(FromList.java)

at org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(SelectNode.java)

at org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(DMLStatementNode.java)

at org.apache.derby.impl.sql.compile.DMLStatementNode.bind(DMLStatementNode.java)

at org.apache.derby.impl.sql.compile.ReadCursorNode.bind(ReadCursorNode.java)

at org.apache.derby.impl.sql.compile.CursorNode.bind(CursorNode.java)

at org.apache.derby.impl.sql.GenericStatement.prepMinion(GenericStatement.java)

at org.apache.derby.impl.sql.GenericStatement.prepare(GenericStatement.java)

at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(GenericLanguageConnectionContext.java)

at org.apache.derby.impl.jdbc.EmbedStatement.execute(EmbedStatement.java)

at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(EmbedStatement.java)

at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:113)

at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:39)

at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:124)

at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:249)

at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1031)

at it.airventsam.markab.core.hibernate.HibernateService.start(HibernateService.java:107)

at org.sapia.soto.ServiceMetaData.start(ServiceMetaData.java:75)

at org.sapia.soto.SotoContainer.start(SotoContainer.java:246)

at it.airventsam.markab.core.CoreHelper.start(CoreHelper.java:66)

at it.airventsam.markab.containers.CoreStandalone.main(CoreStandalone.java:38)

ERROR [main] could not complete schema update

This due the new code into the IBM DB2 dialect. Is that a bug or i am doing something wrong?

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 12:45 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Perhaps a bug. But there is not enough information. What SQL is Hibernate trying to execute? When? What generators are you using?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:00 pm 
Newbie

Joined: Tue Jan 25, 2005 12:25 pm
Posts: 9
Sorry, you're right. I'm still a beginner here.
I got this message when initializing the first sessionFactory. I currently use Hibernate Annotations 3.0 alpha. I checked the code of DB2Dialect and there's a reference to that system table that DONT exists in Derby. So, that is a problem.

Anyway i used automatic generators into annotations.

I already have rolled back to previous beta because of that problem


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:14 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
I haven't had a chance to test it yet. I'm getting ready to now. One thing that I ran into previously though was that I was using and it was using "hi lo" which isn't what I wanted.

@Id(generate=GeneratorType.AUTO)

So, I switched to using,

@Id(generate=GeneratorType.IDENTITY)

so that it uses an identity column instead.

Not sure if that has anything to do with your problem or not. What I'm wondering is why it uses hi lo instead of identity as the default for auto?

Identity seems to work OK, at least if you specify it explicitly (with 3.0beta1 and annotations alpha1).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 25, 2005 1:15 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Actually, are you using DB2Dialect? I'm using DerbyDialect which I think was added only recently...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 3:48 am 
Newbie

Joined: Tue Jan 25, 2005 12:25 pm
Posts: 9
I'm using DerbyDialect, AUTO generator, Hibernate 3.0 beta1 and Annotation 3.0 Alpha, and everythink works fine. With Hibernate 3.0 beta2 only i got these errors. I didnt try changing generators to IDENTITY because i need to use that setting when using other database engines.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 7:32 am 
Newbie

Joined: Tue Jan 25, 2005 12:25 pm
Posts: 9
To fix that bug i've overridden the getQuerySequencesString() call on the DerbyDialect class with a null method (like before was):

public String getQuerySequencesString() {
return null ;
}

And now everything works fine.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 26, 2005 7:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Submit a patch to JIRA please.


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