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 E85D318692 for ; Fri, 9 Oct 2015 14:08:33 +0000 (UTC) Received: (qmail 85043 invoked by uid 500); 9 Oct 2015 14:08:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 84985 invoked by uid 500); 9 Oct 2015 14:08:26 -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 84971 invoked by uid 99); 9 Oct 2015 14:08:26 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Oct 2015 14:08:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id B0012C16E3 for ; Fri, 9 Oct 2015 14:08:25 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.901 X-Spam-Level: ** X-Spam-Status: No, score=2.901 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=3, HTML_OBFUSCATE_05_10=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id GsVdJJd9SBxa for ; Fri, 9 Oct 2015 14:08:15 +0000 (UTC) Received: from mail-qg0-f42.google.com (mail-qg0-f42.google.com [209.85.192.42]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id B64DB20382 for ; Fri, 9 Oct 2015 14:08:14 +0000 (UTC) Received: by qgx61 with SMTP id 61so69333699qgx.3 for ; Fri, 09 Oct 2015 07:08:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=v8/BghzLybWNolpCqUJXioXGEMRmBAkRdKQpo/n8kk8=; b=pwHDIB2L56/FdoDQb3Y/mvqenP44ZZe3NiDntbAazLnja72eOLFmTlnKNg07yRVKeu HuA63DyC36BKviq/yI63nCYm3L/eakow9I5fwSersALJ4rt3bv4A/vZyey3vGyfua3Rh rJqpgteQdxObgMJJNTT56tlT9GC+0saOLSsrr7RYMMUiKL619UTh2nwSdxjTkPVl0n5W nBfpTUTMbA80bPoglMyNK/zXcMGpetCNtuAgy2yJcS4BfVKZ9pGv/ikxBbba3r2ZaMlO W1l9SdQHhERBe64tKloJnZLZsn1FJpOycmWq4uQX+2f49qgND6Fw12KBATbGeqkDLZ8d 9SGw== X-Received: by 10.140.108.202 with SMTP id j68mr15170309qgf.101.1444399688070; Fri, 09 Oct 2015 07:08:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.41.71 with HTTP; Fri, 9 Oct 2015 07:07:48 -0700 (PDT) From: =?UTF-8?Q?Sigbj=C3=B8rn_Lund_Olsen?= Date: Fri, 9 Oct 2015 16:07:48 +0200 Message-ID: Subject: Having some trouble running tests with custom codec To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a1139c15c523f6f0521ac82e8 --001a1139c15c523f6f0521ac82e8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable As part of my master's thesis I am planning on implementing a custom Lucene codec for compression experiments. To get started with my prototype, I've tried following the instructions here (but using the more recent Lucene 5.3.1): http://opensourceconnections.com/blog/2013/06/05/build-your-own-lucene-code= c/ However, I am having some trouble getting the codec to load when running Lucene tests. I've uploaded a minimal project at https://github.com/sigbjornlo/codecs Running *mvn package* generates a jar with a file *META-INF/services/org.apache.lucene.codecs.Codec* containing a single line= : edu.ntnu.sigbjornlo.codecs.HelloCodec ...which is where the codec class resides at. It's just a FilterCodec subclass that does nothing extra. Running *ant -Dtestcase=3DTestSegmentTermDocs -Dtests.codec=3DHelloCodec -l= ib /path/to/hello-1.0.jar* test gives me the following error: java.lang.IllegalArgumentException: An SPI class of type org.apache.lucene.codecs.Codec with name 'HelloCodec' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classpath supports the following names: [SimpleText, Asserting, CheapBastard, FastCompressingStoredFields, FastDecompressionCompressingStoredFields, HighCompressionCompressingStoredFields, DummyCompressingStoredFields, Lucene53] What might I be doing wrong here? Is there any way to make Lucene's SPI loader log what it's trying and/or failing to load, and why? (Be adviced: I have also asked this question on StackOverflow: http://stackoverflow.com/questions/33039973/how-to-configure-lucene-to-use-= a-custom-codec-from-external-jar ) Sincerely, Sigbj=C3=B8rn Lund Olsen --001a1139c15c523f6f0521ac82e8--