Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5C8D10AF4 for ; Wed, 12 Jun 2013 17:52:58 +0000 (UTC) Received: (qmail 38047 invoked by uid 500); 12 Jun 2013 17:52:56 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 38011 invoked by uid 500); 12 Jun 2013 17:52:56 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 38003 invoked by uid 99); 12 Jun 2013 17:52:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 17:52:56 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of uwe@thetaphi.de designates 188.138.97.18 as permitted sender) Received: from [188.138.97.18] (HELO mail.sd-datasolutions.de) (188.138.97.18) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 17:52:50 +0000 Received: from VEGA (port-92-196-45-247.dynamic.qsc.de [92.196.45.247]) by mail.sd-datasolutions.de (Postfix) with ESMTPSA id BFCFB14AA01D for ; Wed, 12 Jun 2013 17:52:29 +0000 (UTC) From: "Uwe Schindler" To: References: In-Reply-To: Subject: RE: Exception while creating a Tokenizer Date: Wed, 12 Jun 2013 19:52:29 +0200 Message-ID: <047b01ce6795$9b9c1a90$d2d44fb0$@thetaphi.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHa8cu9jCu4KRh0FXW0SImObLLHqpkZR0ig Content-Language: de X-Virus-Checked: Checked by ClamAV on apache.org 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: uwe@thetaphi.de > -----Original Message----- > From: Gucko Gucko [mailto:gucko.gucko@googlemail.com] > Sent: Wednesday, June 12, 2013 7:48 PM > To: java-user@lucene.apache.org > Subject: Exception while creating a Tokenizer >=20 > Hello all, >=20 > I'm trying the following code (trying to play with Tokenizers in order = to create > my own Analyzer) but I'm getting an exception: >=20 > public class TokenizerTest { >=20 > public static void main(String[] args) throws IOException { >=20 > String text =3D "A #revolution http://hi.com in test@test.com = software > technology has 4"; >=20 > Tokenizer tokenizer =3D new UAX29URLEmailTokenizer(Version.LUCENE_43, >=20 > new StringReader(text)); >=20 > TokenStream stream =3D new LowerCaseFilter(tokenizer); >=20 > CharTermAttribute term =3D = stream.addAttribute(CharTermAttribute.class); >=20 > stream.reset(); >=20 > while( stream.incrementToken() ) { >=20 > System.out.println( term ); >=20 > } >=20 >=20 > } >=20 > } >=20 >=20 >=20 > Exception: >=20 > Exception in thread "main" java.lang.NoSuchMethodError: > org.apache.lucene.util.ArrayUtil.getNextSize(I)I >=20 > at > = org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.initTermBuff= > er( > TermAttributeImpl.java:142) >=20 > at > = org.apache.lucene.analysis.tokenattributes.TermAttributeImpl.termBuffer( > TermAttributeImpl.java:92) >=20 > at org.apache.lucene.analysis.LowerCaseFilter.incrementToken( > LowerCaseFilter.java:39) >=20 > at tests.TokenizerTest.main(TokenizerTest.java:23) --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org