Tuesday, September 09, 2008

Groovy Datasources - Changing Hibernate Dialect - Oracle 11g

I found a funny while working with some Grails applications today. I have been developing one of my Grails applications for about 2 or 3 weeks now. I updated DataSource.groovy on Day 1 to make the application work with my development Oracle repository and all was well.

Yesterday, I migrated my development Oracle environment to 11g and my Grails application stopped functioning. I was receiving messages stating that the correct Hibernate dialect was not able to be determined. I was forced to explicitly list which dialect to use within my DataSources.groovy file and I thought I'd share.

If you migrate to Oracle 11g (from any previous release...in my case it was, and you need to specify the Hibernate dialect then you will need to add the following line to your DataSources.groovy within the DataSource block:

dialect = org.hibernate.dialect.OracleDialect

1 comment:

  1. Hibernate is the most common and famous ORM using these days. It has a property called “Dialect” through which we tells Hibernate that we are using ‘this specific’ database.


    ethical seo


Please leave a comment...