Re: Problems using Grails with Postgresql

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: priyaa <pri8419(at)yahoo(dot)co(dot)in>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Problems using Grails with Postgresql
Date: 2008-07-21 16:13:29
Message-ID: dcc563d10807210913p53df937ched80c732f10f9051@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 21, 2008 at 5:00 AM, priyaa <pri8419(at)yahoo(dot)co(dot)in> wrote:
>
> i am using postgresql instead of mysql ,but while execute i am getting error
> like
>
>
> Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
> org.springframework.dao.InvalidDataAccessResourceUsageException: could not
> execute query; nested exception is
> org.hibernate.exception.SQLGrammarException: could not execute query
>
>
> my codings in datasource:
>
>
> dataSource {
> pooled = false
>
> driverClassName = "org.postgresql.Driver"
> username ="sa"
> password =""
> }
> hibernate {
> cache.use_second_level_cache=true
> cache.use_query_cache=true
>
> cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
>
> }
> // environment specific settings
> environments {
> development {
> dataSource {
>
> dbCreate = "update" // one of 'create', 'create-drop','update'
> url ="jdbc:postgresql://localhost:5432/test"
> }
> }
> test {
> dataSource {
> dbCreate = "update"
> url = "jdbc:hsqldb:mem:testDb"
>
> }
> }
> production {
> dataSource {
> dbCreate = "update"
> url = "jdbc:hsqldb:file:prodDb;shutdown=true"

Shouldn't that be a pgsql url not hsqldb right there?

It sounds like you're using the wrong db personality with hibernate.
You need hibernate to think in pgsql syntax for it to work right.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Said Ramirez 2008-07-21 16:14:12 Re: How to remove duplicate lines but save one of the lines?
Previous Message Ludwig Kniprath 2008-07-21 15:59:05 Re: Field size