thank you so much. Yes the problem was that I had a jar that's using Lucene 1.5.
Best! On Wed, Jun 12, 2013 at 7:52 PM, Uwe Schindler <u...@thetaphi.de> wrote: > Hi, > > This happens if you have incompatible Lucene versions next to each other > in your classpath. Please clean up your classpath carefully and make sure > all JAR files of Lucene have the same version and no duplicate JARs with > different versions are in it! > > Uwe > > ----- > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213 Bremen > http://www.thetaphi.de > eMail: u...@thetaphi.de > > > > -----Original Message----- > > From: Gucko Gucko [mailto:gucko.gu...@googlemail.com] > > Sent: Wednesday, June 12, 2013 7:48 PM > > To: java-user@lucene.apache.org > > Subject: Exception while creating a Tokenizer > > > > Hello all, > > > > I'm trying the following code (trying to play with Tokenizers in order > to create > > my own Analyzer) but I'm getting an exception: > > > > public class TokenizerTest { > > > > public static void main(String[] args) throws IOException { > > > > String text = "A #revolution http://hi.com in t...@test.com software > > technology has 4"; > > > > Tokenizer tokenizer = new UAX29URLEmailTokenizer(Version.LUCENE_43, > > > > new StringReader(text)); > > > > TokenStream stream = new LowerCaseFilter(tokenizer); > > > > CharTermAttribute term = stream.addAttribute(CharTermAttribute.class); > > > > stream.reset(); > > > > while( stream.incrementToken() ) { > > > > System.out.println( term ); > > > > } > > > > > > } > > > > } > > > > > > > > Exception: > > > > Exception in thread "main" java.lang.NoSuchMethodError: > > org.apache.lucene.util.ArrayUtil.getNextSize(I)I > > > > at > > org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.initTermBuff > > er( > > TermAttributeImpl.java:142) > > > > at > > org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.termBuffer( > > TermAttributeImpl.java:92) > > > > at org.apache.lucene.analysis.LowerCaseFilter.incrementToken( > > LowerCaseFilter.java:39) > > > > at tests.TokenizerTest.main(TokenizerTest.java:23) > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >