简体   繁体   中英

grails 2.4.2 searchable plugin

I have installed the searchable plugin in grails 2.4.2.

compile ":searchable:0.6.9"

It is getting installed successfully but when I run the application, it gives this error. I do not have any controllers made. just one domain class which is declared searchable. How to resolve this?

Sep 2, 2014 7:34:11 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
Sep 2, 2014 7:34:11 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
| Running Grails application
Sep 2, 2014 7:34:24 PM org.codehaus.groovy.runtime.m12n.MetaInfExtensionModule newModule
WARNING: Module [groovy-all] - Unable to load extension class [org.codehaus.groovy.runtime.NioGroovyMethods]
Error |
2014-09-02 19:34:57,557 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener  - 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 be
an failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass':
FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
Message: Error creating bean with name 'grails.plugin.searchable.SearchableController': Initialization of bean failed; nested exc
eption is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'searchableService': Initializat
ion of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'c
ompass': FactoryBean threw exception on object creation; nested exception is java.lang.NullPointerException
   Line | Method
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   138 | run      in java.util.concurrent.FutureTask
|   885 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   907 | run      in     ''
^   619 | run . .  in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'searchableService': Initialization of bean failed; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'compass': FactoryBean threw excepti
on on object creation; nested exception is java.lang.NullPointerException   
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   138 | run      in java.util.concurrent.FutureTask
|   885 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   907 | run      in     ''
^   619 | run . .  in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'compass': FactoryBean threw exception on object creation; nested
exception is java.lang.NullPointerException
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   138 | run      in java.util.concurrent.FutureTask
|   885 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   907 | run      in     ''
^   619 | run . .  in java.lang.Thread
Caused by NullPointerException: null
->> 303 | addAll   in java.util.AbstractCollection
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|   121 | configure in grails.plugin.searchable.internal.compass.config.DefaultGrailsDomainClassMappingSearchableCompassConfigura
tor
|    39 | configure in grails.plugin.searchable.internal.compass.config.CompositeSearchableCompassConfigurator
|    93 | buildCompass in grails.plugin.searchable.internal.compass.spring.SearchableCompassFactoryBean
|    58 | getObject in     ''
|    41 | getObject in     ''
|   303 | innerRun in java.util.concurrent.FutureTask$Sync
|   138 | run      in java.util.concurrent.FutureTask
|   885 | runTask  in java.util.concurrent.ThreadPoolExecutor$Worker
|   907 | run      in     ''
^   619 | run . .  in java.lang.Thread
| Error Forked Grails VM exited with error

Can you try using the command line installing the searchable plugin.

grails install-plugin searchable (I am assuming you are using java 1.5+)

once the plugin is installed then try to have make your domain searchable since I believe the Searchable controllers and service classes are created during the installation.

What version of Hibernate plugin are you using? Note that Searchable plugin does not work with Hibernate 4; you must use Hibernate 3 instead.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM