Hi, It looks like you are using the HSQLDB dialect with H2, and this dialect tries to query the table SYSTEM_SEQUENCES. Most of the time, the HSQLDB dialect works fine with H2, but it seems in this case you need to use the H2 dialect (or another one, for example the PostgreSQL dialect).
The latest H2 dialect for Hibernate is included in the H2 source code, but the class is renamed to .java.txt - see src/tools/org/hibernate/dialect/H2Dialect.java.txt. The H2 dialect that comes with Hibernate contains a bug (it only affects you when using BOOLEAN columns). Regards, Thomas On Thu, Jun 25, 2009 at 4:20 PM, Varun<[email protected]> wrote: > > Hi, > > I am getting folowing exception using H2 with Hibernate3.3. I would > appreciate if someone help on this issue. > > > org.h2.jdbc.JdbcSQLException: Table SYSTEM_SEQUENCES not found; SQL > statement: > select sequence_name from information_schema.system_sequences > [42102-114] > at org.h2.message.Message.getSQLException(Message.java:105) > at org.h2.message.Message.getSQLException(Message.java:116) > at org.h2.message.Message.getSQLException(Message.java:75) > at org.h2.schema.Schema.getTableOrView(Schema.java:383) > at org.h2.command.Parser.readTableOrView(Parser.java:4244) > at org.h2.command.Parser.readTableFilter(Parser.java:970) > at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1500) > at org.h2.command.Parser.parseSelectSimple(Parser.java:1597) > at org.h2.command.Parser.parseSelectSub(Parser.java:1494) > at org.h2.command.Parser.parseSelectUnion(Parser.java:1339) > at org.h2.command.Parser.parseSelect(Parser.java:1327) > at org.h2.command.Parser.parsePrepared(Parser.java:394) > at org.h2.command.Parser.parse(Parser.java:290) > at org.h2.command.Parser.parse(Parser.java:262) > at org.h2.command.Parser.prepareCommand(Parser.java:234) > at org.h2.engine.Session.prepareLocal(Session.java:409) > at org.h2.engine.Session.prepareCommand(Session.java:370) > at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java: > 1044) > at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:68) > at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences > (DatabaseMetadata.java:151) > at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init> > (DatabaseMetadata.java:69) > at org.hibernate.tool.hbm2ddl.SchemaValidator.validate > (SchemaValidator.java:132) > at org.hibernate.impl.SessionFactoryImpl.<init> > (SessionFactoryImpl.java:349) > at org.hibernate.cfg.Configuration.buildSessionFactory > (Configuration.java:1327) > at com.test.HibernateUtil.<clinit>(HibernateUtil.java:14) > at com.test.EventManager.listEvents(EventManager.java:29) > at com.test.EventManager.main(EventManager.java:15) > > Thanks in advance, > Varun > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
