Allow me to recommend a little trick to track the origin of a class which works
often:
org.apache.lucene.analysis.WhitespaceAnalyzer.class.getResource("WhitespaceAnalyzer.class")
will give you a URL that should be the URL of the jar, followed by an
exclamation mark, followed by the jar-internal path. Or a URL to the class file.
paul
Le 14 déc. 2010 à 08:12, Uwe Schindler a écrit :
> Then it seems that you have a classpath mismatch. Can it be that you are
> mixing different Lucene versions (like the unreleased 3.x-Branch).
> StandardAnalyzer in 3.0.2 definitely does not use CharacterUtils (and also
> not in later versions). WhitespaceTokenizer in 3.x uses it.
>
> So you should review your classpath and remove all additional Lucene JAR
> files/class files that may be somewhere inside.
>
> There is nothing else that we can suggest.
>
> Uwe
>
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: [email protected]
>
>
>> -----Original Message-----
>> From: Lahiru Samarakoon [mailto:[email protected]]
>> Sent: Tuesday, December 14, 2010 8:00 AM
>> To: [email protected]
>> Subject: Re: java.lang.NoClassDefFoundError:
>> org/apache/lucene/util/CharacterUtils
>>
>> org.apache.lucene.analysis.standard.StandardAnalyzer
>>
>> On Tue, Dec 14, 2010 at 12:18 PM, Uwe Schindler <[email protected]> wrote:
>>
>>> This class is Lucene 3.1+ only, currently not released. What package
>>> wants to link with it?
>>>
>>> -----
>>> Uwe Schindler
>>> H.-H.-Meier-Allee 63, D-28213 Bremen
>>> http://www.thetaphi.de
>>> eMail: [email protected]
>>>
>>>> -----Original Message-----
>>>> From: Lahiru Samarakoon [mailto:[email protected]]
>>>> Sent: Tuesday, December 14, 2010 7:05 AM
>>>> To: [email protected]
>>>> Subject: java.lang.NoClassDefFoundError:
>>>> org/apache/lucene/util/CharacterUtils
>>>>
>>>> Hi All,
>>>>
>>>> I am using *lucene-3.0.2* with *spring framework-3.0.5*. Spring
>>>> context initialization failed due to a
> *java.lang.NoClassDefFoundError:
>>>> org/apache/lucene/util/CharacterUtils*. But that class can not be
>>>> found
>>> in
>>>> the jars shipped with *lucene-3.0.2*. I am stumped here. Please
> advice.
>>>>
>>>> Thanks,
>>>> Lahiru
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]