gpt4 book ai didi

spring - Grails解决迁移插件和可搜索插件之间的冲突

转载 作者:行者123 更新时间:2023-12-02 14:51:25 25 4
gpt4 key购买 nike

我在grails(版本2.3.0 )上同时使用了迁移插件(版本1.3.8 )和可搜索插件(版本0.6.5 ),但是我无法使迁移插件后运行可搜索插件。

我搜索并找到了解决方案:

将此添加到 config.groovy

bulkIndexOnStartup = false
mirrorChanges = false

并将其添加到 bootstrap.groovy
searchableService.reindex()
searchableService.startMirroring()

但这对 没有帮助。

这是我得到的错误:
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)

谢谢,

最佳答案

直到获得永久解决方案,我才这样做。

1.注释掉buildConfig.groovy 中的可搜索插件(当您运行下一个grails命令时,它将自动卸载)

2.使用迁移插件进行任何操作

3.取消注释buildConfig.groovy 中的可搜索插件(当您运行下一个grails命令时,它将自动安装)

但仍然好奇地知道为什么这样做:

bulkIndexOnStartup = false
mirrorChanges = false

直到 bootstrap 才禁用插件

关于spring - Grails解决迁移插件和可搜索插件之间的冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26973915/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com