stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manish Aggarwal <mani.i...@gmail.com>
Subject getting exception when switched to newer version of solr
Date Wed, 25 Sep 2013 11:49:16 GMT
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?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message