stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rupert Westenthaler <rupert.westentha...@gmail.com>
Subject Re: getting exception when switched to newer version of solr
Date Wed, 25 Sep 2013 18:55:55 GMT
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 <mani.iitb@gmail.com> wrote:
> the exception is coming in line
>
> server = solrServerProvider.getSolrServer(solrServerRef, null);//,
>
>
> On Wed, Sep 25, 2013 at 5:19 PM, Manish Aggarwal <mani.iitb@gmail.com>wrote:
>
>> Hi,
>>
>> I am using the following library in my project
>>                 <dependency>
>> <groupId>org.apache.stanbol</groupId>
>>  <artifactId>org.apache.stanbol.commons.solr.managed</artifactId>
>> <version>0.12.0-SNAPSHOT</version>
>>  </dependency>
>>
>> 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.StandaloneManagedSolrServer.initServer(StandaloneManagedSolrServer.java:220)
>>  at
>> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolrServer.<init>(StandaloneManagedSolrServer.java:203)
>> at
>> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolrServer.createManagedServer(StandaloneManagedSolrServer.java:169)
>>  at
>> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolrServer.getManagedServer(StandaloneManagedSolrServer.java:118)
>> at
>> org.apache.stanbol.commons.solr.managed.standalone.StandaloneManagedSolrServer.getManagedServer(StandaloneManagedSolrServer.java:154)
>>  at
>> org.apache.stanbol.commons.solr.managed.standalone.StandaloneEmbeddedSolrServerProvider.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 = 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 =
>> IndexReference.parse(config.getSolrServerLocation());
>>         solrServerProvider =
>> StandaloneEmbeddedSolrServerProvider.getInstance();
>>         server = solrServerProvider.getSolrServer(solrServerRef, null);//,
>>                 //config.isAllowInitialisation() ?
>> config.getIndexConfigurationName() : null);
>>         //Optional support for the nsPrefix service
>>         final NamespacePrefixService nsPrefixService;
>>         ServiceLoader<NamespacePrefixService> spsl =
>> ServiceLoader.load(NamespacePrefixService.class);
>>         Iterator<NamespacePrefixService> it = spsl.iterator();
>>         if(it.hasNext()){
>>             nsPrefixService = it.next();
>>         } else {
>>             nsPrefixService = null;
>>         }
>>         yard = 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?
>>
>>
>>
>>



-- 
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstra├če 11                             ++43-699-11108907
| A-5500 Bischofshofen

Mime
View raw message