lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <p...@hoplahup.net>
Subject Re: java.lang.NoClassDefFoundError: org/apache/lucene/util/CharacterUtils
Date Tue, 14 Dec 2010 07:43:50 GMT
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: uwe@thetaphi.de
> 
> 
>> -----Original Message-----
>> From: Lahiru Samarakoon [mailto:lahiruts@gmail.com]
>> Sent: Tuesday, December 14, 2010 8:00 AM
>> To: java-user@lucene.apache.org
>> 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 <uwe@thetaphi.de> 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: uwe@thetaphi.de
>>> 
>>>> -----Original Message-----
>>>> From: Lahiru Samarakoon [mailto:lahiruts@gmail.com]
>>>> Sent: Tuesday, December 14, 2010 7:05 AM
>>>> To: java-user@lucene.apache.org
>>>> 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: java-user-unsubscribe@lucene.apache.org
>>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>> 
>>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message