PostgreSQL 8 and EJB3 and Hibernate
perfectionist Sep 24, 2005 3:26 PMI am having a problem getting EJB3 from AS 4.0.3RC2 to work with PostgreSQL database. Have been working on windows, linux and mac osx and all of them fail with the same message. It has to do with system_sequences. I have this code working with the built in hypersonic but when I make changes to the datasource configuration files it seems to work but fails on completing the schema update.
Are there issues with Postgres?
This is a snippet from the log file. If here are any more configuration information needed I can supply it. But I bet someone has seen this before and can tell me about the error.
Thanks!
... 14:15:43,094 INFO [SettingsFactory] Default entity-mode: pojo 14:15:43,106 INFO [SessionFactoryImpl] building session factory 14:15:46,811 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured 14:15:46,815 INFO [SchemaUpdate] Running hbm2ddl schema update 14:15:46,815 INFO [SchemaUpdate] fetching database metadata 14:15:46,853 ERROR [SchemaUpdate] could not get database metadata org.postgresql.util.PSQLException: ERROR: relation "system_sequences" does not exist at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1499) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1284) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:429) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:334) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:233) at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:142) 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:132) at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:297) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1033) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:439) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:272) at org.jboss.ejb3.Ejb3Deployment.initializeManagedEntityManagerFactory(Ejb3Deployment.java:476) at org.jboss.ejb3.Ejb3Deployment.create(Ejb3Deployment.java:219) ...