Return-Path: X-Original-To: apmail-stanbol-dev-archive@www.apache.org Delivered-To: apmail-stanbol-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 33B81103CA for ; Wed, 25 Sep 2013 18:56:25 +0000 (UTC) Received: (qmail 4582 invoked by uid 500); 25 Sep 2013 18:56:25 -0000 Delivered-To: apmail-stanbol-dev-archive@stanbol.apache.org Received: (qmail 4369 invoked by uid 500); 25 Sep 2013 18:56:23 -0000 Mailing-List: contact dev-help@stanbol.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stanbol.apache.org Delivered-To: mailing list dev@stanbol.apache.org Received: (qmail 4361 invoked by uid 99); 25 Sep 2013 18:56:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 18:56:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rupert.westenthaler@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-wg0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Sep 2013 18:56:17 +0000 Received: by mail-wg0-f44.google.com with SMTP id b13so88184wgh.23 for ; Wed, 25 Sep 2013 11:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=IOmcmBOlTEUjiYb0N+TUTojRq8aQtXSEEE8M4b59BE0=; b=EGE9pUMZ8fz1DyKVPOKnnUioWiIBiLOZl9gtIvrLCPDSXIKu0aPBnf4GFlzknrmUV6 MEhT9tTwqMfsttbbmak9R9mooKsnV28Pdl/X7kujVj+9QPmv/pPPjjKlqdamKvfw4a6a 1SE5LIuXc4yhxlUReWEKoGo9JqD7U/9MSPV1bgglRPaz3eERN8laplekU9xtllixgwXp dDDvNKXutVSrWUBpsf1dBxu7Vf0hMBFASex8yPTT16SLmBrlOl804uqUpYu6fkermDit X0KuRg5yDMxxoBJcZf5gu7y6Sa0N/gcoK6xfai+/IJufRCngGkXQZ1ztyTpdUZYKghgx 6CGg== MIME-Version: 1.0 X-Received: by 10.194.193.4 with SMTP id hk4mr28454024wjc.29.1380135355975; Wed, 25 Sep 2013 11:55:55 -0700 (PDT) Received: by 10.216.181.138 with HTTP; Wed, 25 Sep 2013 11:55:55 -0700 (PDT) In-Reply-To: References: Date: Wed, 25 Sep 2013 20:55:55 +0200 Message-ID: Subject: Re: getting exception when switched to newer version of solr From: Rupert Westenthaler To: "dev@stanbol.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi Manish With STANBOL-1162 (revision 1525560 [2]) Stanbol switched to Solr 4.4. I assume that this error comes from using a newer revision of commons.solr.managed with an older version of commons.solr.core as the "CoreContainer.load()" method was added in Solr 4.3 and is not present in Solr 4.2 If you do not use a new launcher please check that installed * commons.solr.* * enhancer.engines.smartcn.token * stanbol.enhancer.engines.kuromoji.nlp * engines.entitylinking.labeltokenizer.kuromoji bundles are newer as [2]. Also ensure * to update to com.google.guava:guava:14.0.1 * and add the bundle com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4 best Rupert [1] https://issues.apache.org/jira/browse/STANBOL-1162 [2] http://svn.apache.org/r1525560 On Wed, Sep 25, 2013 at 1:50 PM, Manish Aggarwal wrot= e: > the exception is coming in line > > server =3D solrServerProvider.getSolrServer(solrServerRef, null);//, > > > On Wed, Sep 25, 2013 at 5:19 PM, Manish Aggarwal wro= te: > >> Hi, >> >> I am using the following library in my project >> >> org.apache.stanbol >> org.apache.stanbol.commons.solr.managed >> 0.12.0-SNAPSHOT >> >> >> Today while running my project I got the following exception (after it >> downloaded the latest version of solr.manaed from maven repos): >> >> Exception in thread "main" java.lang.NoSuchMethodError: >> org.apache.solr.core.CoreContainer.load()V >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolr= Server.initServer(StandaloneManagedSolrServer.java:220) >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolr= Server.(StandaloneManagedSolrServer.java:203) >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolr= Server.createManagedServer(StandaloneManagedSolrServer.java:169) >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolr= Server.getManagedServer(StandaloneManagedSolrServer.java:118) >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolr= Server.getManagedServer(StandaloneManagedSolrServer.java:154) >> at >> org.apache.stanbol.commons.solr.managed.standalone.StandaloneEmbeddedSol= rServerProvider.getSolrServer(StandaloneEmbeddedSolrServerProvider.java:87) >> >> >> >> >> The relevant code is where the exception is coming is : >> >> private static void initYard(String solrServerDir) throws YardException= , >> IOException { >> SolrYardConfig config =3D new SolrYardConfig(YARD_ID, >> SOLR_CORE_NAME); >> config.setName("Dbpedia Solr Yard"); >> config.setDescription("The Solr Yard for querying dbpedia"); >> config.setAllowInitialisation(false); >> System.setProperty(ManagedSolrServer.MANAGED_SOLR_DIR_PROPERTY, >> solrServerDir); >> IndexReference solrServerRef =3D >> IndexReference.parse(config.getSolrServerLocation()); >> solrServerProvider =3D >> StandaloneEmbeddedSolrServerProvider.getInstance(); >> server =3D solrServerProvider.getSolrServer(solrServerRef, null)= ;//, >> //config.isAllowInitialisation() ? >> config.getIndexConfigurationName() : null); >> //Optional support for the nsPrefix service >> final NamespacePrefixService nsPrefixService; >> ServiceLoader spsl =3D >> ServiceLoader.load(NamespacePrefixService.class); >> Iterator it =3D spsl.iterator(); >> if(it.hasNext()){ >> nsPrefixService =3D it.next(); >> } else { >> nsPrefixService =3D null; >> } >> yard =3D new SolrYard(server, config, nsPrefixService); >> } >> >> >> >> This code was working perfectly, till the latest libraries are fetched >> from maven. Kindly let me know in case I am missing something? >> >> >> >> --=20 | Rupert Westenthaler rupert.westenthaler@gmail.com | Bodenlehenstra=C3=9Fe 11 ++43-699-11108907 | A-5500 Bischofshofen