Spring Grails,解决迁移插件和可搜索插件之间的冲突
我在grails 2.3.0版上同时使用迁移插件版本1.3.8和可搜索插件版本0.6.5,但我无法在迁移插件之后运行可搜索插件 我搜索并找到了这个解决方案: 将其添加到config.groovy 并将其添加到bootstrap.groovy中 但这没有帮助 这是我得到的错误:Spring Grails,解决迁移插件和可搜索插件之间的冲突,spring,grails,Spring,Grails,我在grails 2.3.0版上同时使用迁移插件版本1.3.8和可搜索插件版本0.6.5,但我无法在迁移插件之后运行可搜索插件 我搜索并找到了这个解决方案: 将其添加到config.groovy 并将其添加到bootstrap.groovy中 但这没有帮助 这是我得到的错误: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.address' in 'field
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.address' in 'field list'
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
.
.
.
Error executing script DbmGormDiff: org.compass.gps.CompassGpsException: Failed to index, execution exception; nested exception is java.util.concurrent.ExecutionException: org.compass.gps.device.hibernate.HibernateGpsDeviceException: {hibernate}: Failed to index the database; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query using scroll (Use --stacktrace to see the full trace)
谢谢,在我找到一个永久解决方案之前,我已经这么做了 一,。注释掉buildConfig.groovy中的可搜索插件,它将在运行下一个grails命令时自动卸载 二,。使用迁移插件做任何你想做的事情 三,。在buildConfig.groovy中取消对可搜索插件的注释,它将在运行下一个grails命令时自动安装 但仍然很好奇为什么要这样做:
bulkIndexOnStartup = false
mirrorChanges = false
在引导前不禁用插件这对OP来说可能有点太晚了,但万一其他人遇到这个问题。。。我修改了Searchable.groovy中的两个配置属性,而不是config.groovy,并且能够避免未知列错误。我的猜测是,如果您没有对Searchable.groovy进行编辑,那么Searchable.groovy中的默认属性将覆盖Config.groovy中设置的属性。
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'this_.address' in 'field list'
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.Util.getInstance(Util.java:386)
.
.
.
Error executing script DbmGormDiff: org.compass.gps.CompassGpsException: Failed to index, execution exception; nested exception is java.util.concurrent.ExecutionException: org.compass.gps.device.hibernate.HibernateGpsDeviceException: {hibernate}: Failed to index the database; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query using scroll (Use --stacktrace to see the full trace)
bulkIndexOnStartup = false
mirrorChanges = false