Reputation: 813
I'm having a lot of trouble trying to set up a project using Grails 2.4.3 and a PostGIS database through the hibernate-spatial-postgresql plugin. It's a sample project, no other plugin than the default ones are installed. I enabled Postgres first, tried to save domains to my database : everything worked fine. But as soon as I enable hibernate-spatial it's not working anymore.
I'm having the exact same issue as this person does.
I tried excluding "hibernate-core:3.6.0.Final" as he does, but I keep getting the same error. Probably because he uses it with Grails 2.3.0 and I'm using 2.4.3.
I removed the dependency "hibernate-spatial-postgresql" under the plugin part of the BuildConfig.groovy file, still getting the same error.
I really don't know what I should look for. It's for sure a conflict between two libraries, or two versions of hibernate/hibernate-spatial.
I'd like to know if anyone here managed to have Grails and a spatial database playing nicely together ? If so, which database did you use ? How did you configure it ?
EDIT : I already tried replacing the Hibernate4 dependency under the "plugins" section of BuildConfig.groovy
with the Hibernate 3 one (which is commented in the file generated by Grails), then excluding 'org.hibernate:hibernate-core:3.6.0.Final'
. Excluding 'org.hibernate:hibernate-core:3.6.10.17'
doesn't work either.
Thanks a lot for any answer you could give.
Regards.
Upvotes: 1
Views: 652
Reputation: 75671
If you're using 2.4.x you likely have a dependency on the hibernate4 plugin, not the hibernate (v3) plugin. But the older plugin is there commented out, so remove the line for hibernate4 and uncomment the other (e.g. runtime ":hibernate:3.6.10.17"
). You'll also need to update the cache.region.factory_class
setting in DataSource.groovy
Upvotes: 1