class missing from searchable plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

class missing from searchable plugin

Paolo DiCanio
I'm trying to use the latest version of the searchable plugin with a Grails 2.3.3 app. The application is failing to startup due to the following NoClassDefFoundError:


4-12-2013 10:32:23,852 ERROR context.GrailsContextLoader - Error initializing the application: org/apache/lucene/search/spell/Dictionary
java.lang.NoClassDefFoundError: org/apache/lucene/search/spell/Dictionary
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.rebuild(DefaultLuceneSpellCheckManager.java:408)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:654)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:645)
        at org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimit(DefaultExecutorManager.java:106)
        at org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimitBailOnException(DefaultExecutorManager.java:75)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.concurrentRebuild(DefaultLuceneSpellCheckManager.java:385)
        at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:135)
        at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:154)
        at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:128)
        at grails.plugin.searchable.internal.compass.CompassGpsUtils.index(CompassGpsUtils.java:49)
Reply | Threaded
Open this post in threaded view
|

Re: class missing from searchable plugin

Paolo DiCanio
I tried upgrading to Grails 2.3.4 and now I get a different NoClassDefFoundError:

05-12-2013 22:57:26,047 ERROR context.GrailsContextLoader - Error initializing the application: org/apache/lucene/search/spell/LevensteinDistance
java.lang.NoClassDefFoundError: org/apache/lucene/search/spell/LevensteinDistance
        at org.apache.lucene.search.spell.CompassSpellChecker.<init>(CompassSpellChecker.java:124)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$5.doInTransaction(DefaultLuceneSpellCheckManager.java:430)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$5.doInTransaction(DefaultLuceneSpellCheckManager.java:408)
        at org.compass.core.impl.DefaultCompass$CompassTransactionContext.execute(DefaultCompass.java:461)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.rebuild(DefaultLuceneSpellCheckManager.java:408)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:654)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:645)
        at org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimit(DefaultExecutorManager.java:106)
        at org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimitBailOnException(DefaultExecutorManager.java:75)
        at org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.concurrentRebuild(DefaultLuceneSpellCheckManager.java:385)
        at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:135)
        at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:154)
        at org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:128)
        at grails.plugin.searchable.internal.compass.CompassGpsUtils.index(CompassGpsUtils.java:49)
        at SearchableGrailsPlugin$_closure3.doCall(SearchableGrailsPlugin.groovy:157)
Reply | Threaded
Open this post in threaded view
|

Re: class missing from searchable plugin

Mihai Glonț
In reply to this post by Paolo DiCanio
In my BuildConfig I have
        mavenRepo "http://repo.grails.org/grails/core"
        compile(":searchable:0.6.6")
and things work as expected.

Cheers.
On 04/12/13 10:38, Paolo DiCanio wrote:

> I'm trying to use the latest version of the searchable plugin with a Grails
> 2.3.3 app. The application is failing to startup due to the following
> NoClassDefFoundError:
>
>
> 4-12-2013 10:32:23,852 ERROR context.GrailsContextLoader - Error
> initializing the application: org/apache/lucene/search/spell/Dictionary
> java.lang.NoClassDefFoundError: org/apache/lucene/search/spell/Dictionary
> at
> org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.rebuild(DefaultLuceneSpellCheckManager.java:408)
> at
> org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:654)
> at
> org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager$RebuildTask.call(DefaultLuceneSpellCheckManager.java:645)
> at
> org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimit(DefaultExecutorManager.java:106)
> at
> org.compass.core.executor.DefaultExecutorManager.invokeAllWithLimitBailOnException(DefaultExecutorManager.java:75)
> at
> org.compass.core.lucene.engine.spellcheck.DefaultLuceneSpellCheckManager.concurrentRebuild(DefaultLuceneSpellCheckManager.java:385)
> at org.compass.gps.impl.SingleCompassGps.doIndex(SingleCompassGps.java:135)
> at
> org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:154)
> at
> org.compass.gps.impl.AbstractCompassGps.index(AbstractCompassGps.java:128)
> at
> grails.plugin.searchable.internal.compass.CompassGpsUtils.index(CompassGpsUtils.java:49)
>
>
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/class-missing-from-searchable-plugin-tp4652171.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: class missing from searchable plugin

bronoman
In reply to this post by Paolo DiCanio
Paolo:
I took the searchable lib directory at
[...]\.grails\2.3.3\projects\[myProject]\plugins\searchable-0.6.5\lib
including the 8 jars in it
from an old searchable v0.6.5 and grails 2.3.3 install
and copied it over to:
[...]\.grails\2.3.4\projects\[myProject]\plugins\searchable-0.6.6\lib

After a clean and compile, it seems to work...
Cheers!
Reply | Threaded
Open this post in threaded view
|

Re: class missing from searchable plugin

pledbrook
In reply to this post by Paolo DiCanio
To fix this, I added an explicit lucene-spellchecker dependency, as shown in this commit:

    https://github.com/GrailsInAction/graina2/commit/455c4ce798d5c56f8bd74aed4c73722174b0ce58

Hope that helps,

Peter
Reply | Threaded
Open this post in threaded view
|

Re: class missing from searchable plugin

bronoman
...it certainly does help!
Thanks a lot!