使用名称创建 bean 时出错 - Grails 2.3.8
Error creating bean with name - Grails 2.3.8
Grails 2.3.8 错误可搜索插件 6.9 - 创建名称为 grails.plugin.searchable.SearchableController
的 bean 时出错
Error 2016-07-26 09:53:18,826 [localhost-startStop-1] ERROR
context.GrailsContextLoader - Error initializing the application:
Error creating bean with name
'grails.plugin.searchable.SearchableController': Initialization of
bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'searchableService': Initialization of bean
failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'compass': FactoryBean threw exception on
object creation; nested exception is
org.compass.core.mapping.MappingException: No converter defined for
type [org.bson.types.ObjectId]
运行时出现错误,无法修复
我的猜测是您有一个 org.bson.types.ObjectId
类型的可搜索 属性。这不是可搜索插件本身知道如何索引的类型,所以你必须为它定义一个转换器。
Grails 2.3.8 错误可搜索插件 6.9 - 创建名称为 grails.plugin.searchable.SearchableController
Error 2016-07-26 09:53:18,826 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: Error creating bean with name 'grails.plugin.searchable.SearchableController': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchableService': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested exception is org.compass.core.mapping.MappingException: No converter defined for type [org.bson.types.ObjectId]
运行时出现错误,无法修复
我的猜测是您有一个 org.bson.types.ObjectId
类型的可搜索 属性。这不是可搜索插件本身知道如何索引的类型,所以你必须为它定义一个转换器。