Grails - Multiple Datasources

隐身守侯 提交于 2019-12-04 04:52:03

Ok I figured this out.

In the Grails 2.3.7 release notes it says to upgrade your hibernate version. I failed to do that.

http://grails.org/2.3.7+Release+Notes

runtime ':hibernate:3.6.10.10'

Then after I did that I stopped getting that error and got another error

java.lang.ClassNotFoundException: null at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at ....MigrationUtils.createInstance(MigrationUtils.groovy:220) at ....MigrationUtils.getDatabase(MigrationUtils.groovy:57) at ....MigrationUtils.getDatabase(MigrationUtils.groovy:116) at DbmGenerateGormChangelog$_...doCall(DbmGenerateGormChangelog:52) at ....MigrationUtils.executeInSession(MigrationUtils.groovy:132) at DbmGenerateGormChangelog$_run_closure2.doCall(DbmGenerateGormChangelog:51) at DbmGenerateGormChangelog$_run_closure1.doCall(DbmGenerateGormChangelog:33)

I've never had to specify the hibernate dialect for oracle before, but apparently in the most recent version of the migrations plugin (1.3.8 currently), you have to.

dialect = "org.hibernate.dialect.Oracle10gDialect"

I was already specifying the dialect for MySQL so I don't know if it would produce the same error if removed.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!