1 Reply Latest reply on Jul 17, 2012 8:58 AM by James Fellows

    How to resolve following error org.h2.jdbc.JdbcSQLException

    Karola S Newbie

      Hi, I use JBoos Server 7.1 in Seam appliaction and I have problem with deploy appliation on server.

      When I try to do it I have error:

       

      11:31:57,935 ERROR [org.hibernate.tool.hbm2ddl.SchemaValidator] (MSC service thread 1-2) HHH000319: Could not get database metadata: org.h2.jdbc.JdbcSQLException: Tablela "ALL_SEQUENCES" nie istnieje
      Table "ALL_SEQUENCES" not found; SQL statement:
       select sequence_name from all_sequences  union select synonym_name   from all_synonyms us, all_sequences asq  where asq.sequence_name = us.table_name    and asq.sequence_owner = us.table_owner [42102-161]
                at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
                at org.h2.message.DbException.get(DbException.java:169)
                at org.h2.message.DbException.get(DbException.java:146)
                at org.h2.command.Parser.readTableOrView(Parser.java:4749)
                at org.h2.command.Parser.readTableFilter(Parser.java:1075)
                at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1681)
                at org.h2.command.Parser.parseSelectSimple(Parser.java:1788)
                at org.h2.command.Parser.parseSelectSub(Parser.java:1675)
                at org.h2.command.Parser.parseSelectUnion(Parser.java:1518)
                at org.h2.command.Parser.parseSelect(Parser.java:1506)
                at org.h2.command.Parser.parsePrepared(Parser.java:405)
                at org.h2.command.Parser.parse(Parser.java:279)
                at org.h2.command.Parser.parse(Parser.java:251)
                at org.h2.command.Parser.prepareCommand(Parser.java:217)
                at org.h2.engine.Session.prepareLocal(Session.java:415)
                at org.h2.engine.Session.prepareCommand(Session.java:364)
                at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1119)
                at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:70)
                at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:340)
                at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:149) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.tool.hbm2ddl.DatabaseMetadata.<init>(DatabaseMetadata.java:70) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaValidator.java:148) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:460) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1737) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:84) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:904) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:889) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
                at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73) [hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final]
                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_25]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_25]
                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_25]
      
      

       

      I download h2.lib file from this page http://www.h2database.com/html/main.html and add to project

      (Properties-> Java Build Path -> Add External Jars) and error is still displaying.

      Can someone tell me what I do wrong?