searchable plugin on tomcat?

49 views
Skip to first unread message

t.dave

unread,
Feb 24, 2011, 11:24:11 PM2/24/11
to Grails Startup Support Group
hi, has anyone had any success (or problems?) using the searchable
plugin on tomcat? i was able to pretty easily get it working in my
dev env but upon deploying to tomcat have run into a really strange
error.

specifically:

java.lang.ClassCastException:
org.codehaus.groovy.grails.plugins.searchable.compass.mapping.ClosureSearchableGrailsDomainClassCompassClassMapper
cannot be cast to
org.codehaus.groovy.grails.plugins.searchable.compass.mapping.AbstractSearchableGrailsDomainClassCompassClassMapper

i've found a number of posts where people have had this problem but i
can't find any solutions. it may be something specific to the domain
class i'm trying to search on, in that it has a number of "hasMany"
relationships, and perhaps i haven't correctly configured the
"searchable { }" block, or need to indicate that all the other domain
classes should be searchable as well. i do only want to search some
string fields on the single domain class and am not trying to set up
cross domain class searches, but maybe the plugin requires it.

regardless, as i said, it was pretty easy to get it working in dev.
as well, when i deploy to tomcat it complains but the searching
actually works. where it fails that makes it a showstopper is log4j
fails to initialize. as such i've had to uninstall the searchable
plugin and am currently doing a criteria search instead.

i haven't used lucene or compass before but am familiar with a similar
indexer specific to mysql (sphinx - which rocks by the way), so i
understand the advantage of this approach over querying the DB
directly.

so, before i bang my head incessantly against the searchable plugin or
provide lots of specific details as to my current config and solicit
help there, i wanted to see what approaches you guys have taken.
searchable plugin? if so, any problems on tomcat? elastic search
plugin? something else?

thanks!

dave

Adrian Hass

unread,
Feb 25, 2011, 11:12:45 AM2/25/11
to grails-startup...@googlegroups.com
I just had to adjust the paths of the index files and (if not already)
deactivate the SecurityManager, because I didn't want to set the
permissions all the time...

Regards,
Adrian

t.dave

unread,
Feb 25, 2011, 3:57:48 PM2/25/11
to Grails Startup Support Group
haha, i've run into that enough with tomcat that i did it right away.
i haven't disabled/deactivated the security manager but did give read
and write access to the location of the index files.

one thing i forgot to mention in my post above about elastic search -
i've heard people say that they're waiting for it and apparently using
it now that it's out. when i did a search on it the first thing i
found was something saying it's not ready for prime time. let's
see...

http://smaldini.github.com/elasticsearch-grails-plugin/docs/guide/1.%20Introduction.html

"Note that the plugin is still under development, so you may not be
able to use all the features of ElasticSearch yet. As for now, you
should only use this plugin for testing purpose since you may lack
some functionalities in a production environment."

that gives me pause.

t.dave

unread,
Mar 1, 2011, 1:02:21 PM3/1/11
to Grails Startup Support Group
hey all, seem to have figured out a solution to this problem in case
anyone is curious or runs across it later. detailed it here:

http://grails.1312388.n4.nabble.com/Searchable-plugin-issue-td3328471.html


On Feb 25, 2:57 pm, "t.dave" <da...@lorgeousdays.com> wrote:
> haha, i've run into that enough with tomcat that i did it right away.
> i haven't disabled/deactivated the security manager but did give read
> and write access to the location of the index files.
>
> one thing i forgot to mention in my post above about elastic search -
> i've heard people say that they're waiting for it and apparently using
> it now that it's out.  when i did a search on it the first thing i
> found was something saying it's not ready for prime time.  let's
> see...
>
> http://smaldini.github.com/elasticsearch-grails-plugin/docs/guide/1.%...
Reply all
Reply to author
Forward
0 new messages