lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stanislaw Osinski <stanis...@osinski.name>
Subject Re: solr 3.1 java.lang.NoClassDEfFoundError org/carrot2/core/ControllerFactory
Date Wed, 08 Jun 2011 18:07:02 GMT
Hi Bryan,

You'll also need to make sure the your
${solr.dir}/contrib/clustering/lib directory is in the classpath; that
directory contains the Carrot2 JARs that
provide the classes you're missing. I think the example solrconfig.xml
has the relevant <lib> declarations.

Cheers,

S.

On Tue, Jun 7, 2011 at 13:48, bryan rasmussen <rasmussen.bryan@gmail.com>wrote:

> As per the subject I am getting java.lang.NoClassDEfFoundError
> org/carrot2/core/ControllerFactory
> when I try to run clustering.
>
> I am using Solr 3.1:
>
> I get the following error:
>
> java.lang.NoClassDefFoundError: org/carrot2/core/ControllerFactory
>        at
> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngine.<init>(CarrotClusteringEngine.java:74)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown
> Source)
>        at java.lang.reflect.Constructor.newInstance(Unknown Source)
>        at java.lang.Class.newInstance0(Unknown Source)
>        at java.lang.Class.newInstance(Unknown Source)
>        at
> org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:412)
>        at
> org.apache.solr.handler.clustering.ClusteringComponent.inform(ClusteringComponent.java:203)
>        at
> org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:522)
>        at org.apache.solr.core.SolrCore.<init>(SolrCore.java:594)
>        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:458)
>        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:316)
>        at org.apache.solr.core.CoreContainer.load(CoreContainer.java:207)
>        at
> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:130)
>        at
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
>        at
> org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>        at
> org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
>        at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
>        at
> org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
>        at
> org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
>        at
> org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>        at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>        at
> org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>        at
> org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>        at
> org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
>        at org.mortbay.jetty.Server.doStart(Server.java:224)
>        at
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
>        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at org.mortbay.start.Main.invokeMain(Main.java:194)
>        at org.mortbay.start.Main.start(Main.java:534)
>        at org.mortbay.start.Main.start(Main.java:441)
>        at org.mortbay.start.Main.main(Main.java:119)
> Caused by: java.lang.ClassNotFoundException:
> org.carrot2.core.ControllerFactory
>        at java.net.URLClassLoader$1.run(Unknown Source)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(Unknown Source)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
>
> using the following configuration
>
>
>  <searchComponent
> class="org.apache.solr.handler.clustering.ClusteringComponent"
> name="clustering">
>  <lst name="engine">
>    <str name="name">default</str>
>    <str
> name="carrot.algorithm">org.carrot2.clustering.lingo.LingoClusteringAlgorithm</str>
>
>    <!-- Engine-specific parameters -->
>    <str name="LingoClusteringAlgorithm.desiredClusterCountBase">20</str>
>  </lst>
> </searchComponent>
>  <requestHandler name="/search"
> class="org.apache.solr.handler.component.SearchHandler">
>    <lst name="defaults">
>      <str name="echoParams">explicit</str>
>    </lst>
>    <!--
>    By default, this will register the following components:
>
>    <arr name="components">
>      <str>query</str>
>      <str>facet</str>
>      <str>mlt</str>
>      <str>highlight</str>
>      <str>debug</str>
>    </arr>
> </requestHandler>
>
> <requestHandler name="clusty" class="solr.SearchHandler" default="true">
>  <lst name="defaults">
>    <str name="echoParams">explicit</str>
>
>    <bool name="clustering">true</bool>
>    <str name="clustering.engine">default</str>
>    <bool name="clustering.results">true</bool>
>
>    <!-- Fields to cluster on -->
>    <str name="carrot.title">title</str>
>    <str name="carrot.snippet">all_text</str>
>    <str name="hl.fl">all_text title</str>
>     <!-- for this field, we want no fragmenting, just highlighting -->
>     <str name="f.name.hl.fragsize">150</str>
>  </lst>
>  <arr name="last-components">
>    <str>clustering</str>
>  </arr>
> </requestHandler>
>
>
>
> with the following command  to start solr
> java -Dsolr.clustering.enabled=true
> -Dsolr.solr.home="C:\projects\solrexample\solr" -jar start.jar
>
> Any idea as to why crusty is not working?
>
> Thanks,
> Bryan Rasmussen
>

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