Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 04E9F9B06 for ; Tue, 20 Mar 2012 18:10:04 +0000 (UTC) Received: (qmail 30829 invoked by uid 500); 20 Mar 2012 18:10:02 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 30764 invoked by uid 500); 20 Mar 2012 18:10:02 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 30757 invoked by uid 99); 20 Mar 2012 18:10:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 18:10:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Mar 2012 18:10:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 6506EBD1C3 for ; Tue, 20 Mar 2012 18:09:39 +0000 (UTC) Date: Tue, 20 Mar 2012 18:09:39 +0000 (UTC) From: "Hoss Man (Assigned) (JIRA)" To: dev@lucene.apache.org Message-ID: <1053217726.37582.1332266979415.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1430683766.34858.1324463970662.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (SOLR-2983) Unable to load custom MergePolicy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-2983?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] Hoss Man reassigned SOLR-2983: ------------------------------ Assignee: Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe (was: Simon Willnauer) Tomas: as simon said, this patch looks good provided we have a blurb about = the change in the upgrade/backcompat section. wanna go ahead an commit for 3.6? (although: please remove that cut/paste comment about "kitchen sink" in you= r new bad-mp-solrconfig.xml) =20 > Unable to load custom MergePolicy > --------------------------------- > > Key: SOLR-2983 > URL: https://issues.apache.org/jira/browse/SOLR-2983 > Project: Solr > Issue Type: Bug > Reporter: Mathias Herberts > Assignee: Tom=C3=A1s Fern=C3=A1ndez L=C3=B6bbe > Priority: Minor > Fix For: 3.6, 4.0 > > Attachments: SOLR-2983.patch > > > As part of a recent upgrade to Solr 3.5.0 we encountered an error related= to our use of LinkedIn's ZoieMergePolicy. > It seems the code that loads a custom MergePolicy was at some point moved= into SolrIndexConfig.java from SolrIndexWriter.java, but as this code was = copied verbatim it now contains a bug: > try { > policy =3D (MergePolicy) schema.getResourceLoader().newInstance(mpC= lassName, null, new Class[]{IndexWriter.class}, new Object[]{this}); > } catch (Exception e) { > policy =3D (MergePolicy) schema.getResourceLoader().newInstance(mpC= lassName); > } > 'this' is no longer an IndexWriter but a SolrIndexConfig, therefore the c= all to newInstance will always throw an exception and the catch clause will= be executed. If the custom MergePolicy does not have a default constructor= (which is the case of ZoieMergePolicy), the second attempt to create the M= ergePolicy will also fail and Solr won't start. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org