创建名为Grails2.3.8的bean时发生java错误
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]
错误发生在运行时,我无法修复它
# 1 楼答案
我猜您有一个类型为
org.bson.types.ObjectId
的可搜索属性。这不是可搜索插件本机知道如何索引的类型,因此您必须为它定义一个转换器