xircle xircle - 4 months ago 8
Java Question

Error creating bean with name - Grails 2.3.8

Grails 2.3.8 error searchable plugin 6.9 - Error creating bean with name

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]


The error occurs at runtime and I can't fixed it

Answer

My guess is that you have a searchable property of type org.bson.types.ObjectId. This is not a type that the searchable plugin natively knows how to index, so you have to define a converter for it.