lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikhail Khludnev <mkhlud...@griddynamics.com>
Subject Re: Error while initializing EmbeddedSolrServer
Date Sun, 23 Nov 2014 10:23:25 GMT
Hi,

Did you tried to figure out which artefact contains
org.apache.lucene.codecs.Codec? I guess it should be something like
lucene-codec or so.
Also, referring different versions 3.6.2 vs 4.7.2 vs 3.0.3 is dead-end.
Happy OSGIing!

On Sun, Nov 23, 2014 at 6:14 AM, Danesh Kuruppu <dknkuruppu@gmail.com>
wrote:

> Hi all,
>
> I am using solr version 4.7.2. I need to use EmbeddedSolrServer. I am
> getting following error while initializing the coreContainer
>
> Exception in thread "Thread-15" java.lang.NoClassDefFoundError: Could not
> > initialize class org.apache.lucene.codecs.Codec
> >     at
> >
> org.apache.solr.core.SolrResourceLoader.reloadLuceneSPI(SolrResourceLoader.java:186)
> >     at
> >
> org.apache.solr.core.SolrResourceLoader.<init>(SolrResourceLoader.java:122)
> >     at
> >
> org.apache.solr.core.SolrResourceLoader.<init>(SolrResourceLoader.java:236)
> >     at org.apache.solr.core.CoreContainer.<init>(CoreContainer.java:136)
> >
>
> In my case, I create a osgi bundle for solr. when I check the bundle, class
> is in the bundle.
>
> Set dependencies added ,
>
>         <dependency>
> >             <groupId>org.apache.solr</groupId>
> >             <artifactId>solr-solrj</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.solr</groupId>
> >             <artifactId>solr-core</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-analyzers</artifactId>
> >             <version>3.6.2</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-highlighter</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-memory</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-queries</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-snowball</artifactId>
> >             <version>3.0.3</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-misc</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-spellchecker</artifactId>
> >             <version>3.6.2</version>
> >         </dependency>
> >          <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-core</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.lucene</groupId>
> >             <artifactId>lucene-codecs</artifactId>
> >             <version>4.7.2</version>
> >         </dependency>
> >
>
> Code:
>
>         CoreContainer coreContainer = new
> CoreContainer(solrHome.getPath());
> >         coreContainer.load();
> >         this.server = new EmbeddedSolrServer(coreContainer, "");
> >
>
> Could not find the wrong.
> Please help me.
>
> Thanks
> Danesh
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
<mkhludnev@griddynamics.com>

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