title: Using Postgresql with Grails : Missing sequence or table: hibernate_sequence
body: <p>I'm having trouble with Grails 2.0 and Postgresql 9.1</p>
  
  <p>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 :</p>
  
  <pre><code>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
  </code></pre>
  
  <p>My Datasource is : </p>
  
  <pre><code>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"
          }
      }
  }
  </code></pre>
  
  <p>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. </p>
  
  <p>What is strange is that on a previous program, I was quite easily able to make the Player object working with Postgresql 8.3 &amp; Grails 2.0.</p>