Sorry, you have to add a "/" at the beginning:

System.err.println(getClass().getResource("/org/apache/lucene/util/StringHelper.class").toString());
System.err.println(getClass().getResource("/org/apache/lucene/search/NumericRangeQuery.class").toString());

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: u...@thetaphi.de


> -----Original Message-----
> From: Uwe Schindler [mailto:u...@thetaphi.de]
> Sent: Friday, June 17, 2011 1:03 PM
> To: 'java-user@lucene.apache.org'
> Subject: RE: Lucene - TrieRangeQuery
> 
> It seems that you may have some older lucene-core.jar in your classpath
> when running.
> 
> A trick to find out if all come from the same JAR is using the following code:
> System.err.println(getClass().getResource("org/apache/lucene/util/StringHe
> lper.class").toString());
> 
> And compare that with:
> System.err.println(getClass().getResource("org/apache/lucene/search/Num
> ericRangeQuery.class").toString());
> 
> If both outputs contain a different JAR file name, you should fix your
> classpath.
> 
> -----
> Uwe Schindler
> H.-H.-Meier-Allee 63, D-28213 Bremen
> http://www.thetaphi.de
> eMail: u...@thetaphi.de
> 
> 
> > -----Original Message-----
> > From: Sowmya V.B. [mailto:vbsow...@gmail.com]
> > Sent: Friday, June 17, 2011 12:23 PM
> > To: java-user@lucene.apache.org
> > Subject: Re: Lucene - TrieRangeQuery
> >
> > Hi
> >
> > Thanks for the reply. I've been trying to use these classes -
> > NumericRangeQuery, TermRangeQuery etc.
> >
> > However, though I don't get compilation errors, I get a runtime error.
> > Here is a brief trace. I mentioned this in a previous mail thread..but
> > it got lost in the middle I guess.:
> >
> > java.lang.NoSuchMethodError:
> > org.apache.lucene.util.StringHelper.intern(Ljava/lang/String;)Ljava/la
> > ng/Strin
> > g;
> >
> >
> org.apache.lucene.search.TermRangeTermEnum.<init>(TermRangeTermEnu
> > m.java:79)
> >
> >
> org.apache.lucene.search.TermRangeQuery.getEnum(TermRangeQuery.java
> > :135)
> >
> >
> org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:76
> > )
> >
> org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
> >
> org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:288)
> >     org.apache.lucene.search.Query.weight(Query.java:94)
> >     org.apache.lucene.search.Searcher.createWeight(Searcher.java:185)
> >     org.apache.lucene.search.Searcher.search(Searcher.java:136)
> >     org.apache.lucene.search.Searcher.search(Searcher.java:146)
> >
> > I am not able to figure out what the issue here is.
> > **************
> > Hi,
> >
> > It's called NumericRangeQuery *and* included since *Lucene* 2.9 into
> Core.
> >
> > Here the documentation from latest *Lucene*: http://s.apache.org/nrq
> >
> > *Uwe*
> > -----
> > *Uwe* *Schindler*
> >
> >
> > On Fri, Jun 17, 2011 at 11:09 AM, Sowmya V.B. <vbsow...@gmail.com>
> > wrote:
> >
> > > Hi All
> > >
> > > Can someone suggest me where I can get an implementation of
> > > LongTrieRangeQuery class? I read about it in one of the Lucene
> > > implementation based reports, but could not find it on Lucene Src.
> > > Does that exist now?
> > > The report I read referred to an implementation by Uwe  Schindler.
> > >
> > > A related online article:
> > > http://www.marcsturlese.com/2009/04/08/lucene-trierangequery/
> > >
> > > S
> > >
> > > --
> > > Sowmya V.B.
> > > ----------------------------------------------------
> > > Losing optimism is blasphemy!
> > > http://vbsowmya.wordpress.com
> > > ----------------------------------------------------
> > >
> >
> >
> >
> > --
> > Sowmya V.B.
> > ----------------------------------------------------
> > Losing optimism is blasphemy!
> > http://vbsowmya.wordpress.com
> > ----------------------------------------------------


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

Reply via email to