I'm having trouble with Grails 2.0 and Postgresql 9.1
I'm trying to map an existing database, with sequential ids. However, even without creating any class in the domain, I'm having the error :
Compiling 1 source files.....
| Running Grails application
| Error executing bootstraps:
Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed;
nested exception is org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory';
(...)
Invocation of init method failed; nested exception is org.hibernate.HibernateException:
Missing sequence or table: hibernate_sequence
My Datasource is :
dataSource {
pooled = true
driverClassName = "org.postgresql.Driver"
username = "postgres"
password = "postgrespass"
dialect = org.hibernate.dialect.PostgreSQLDialect
logSql = true
}
hibernate {
cache.use_second_level_cache = true
cache.use_query_cache = true
cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'
}
// environment specific settings
environments {
development {
dataSource {
dbCreate = ""
url = "jdbc:postgresql://localhost:5432/Rambo"
}
}
}
Tee exisiting database is a Poker software database (Holdem manager). I was working on a PlayerHand object that doesn't use a sequence, but the Player object has a sequence table.
What is strange is that on a previous program, I was quite easily able to make the Player object working with Postgresql 8.3 & Grails 2.0.