cancel
Showing results for 
Search instead for 
Did you mean: 

No bean named 'search.statsService' is defined

mmrvelj
Confirmed Champ
Confirmed Champ
Hi

I am trying to deploy alfresco 5 on tomcat by following instructions. I did manage to get most of it working, but no luck with Solr.

When I download Solr and follow instructions, I cannot get anything to be found. Search never finds anything in the repository and if I try to invoke

<cite>SERVER/alfresco/service/api/solrstats</cite>

I get the following error:


{
    "status" :
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request."
  }, 
 
  "message" : "00140002 Wrapped Exception (with status template): No bean named 'search.statsService' is defined", 
  "exception" : "org.springframework.extensions.webscripts.WebScriptException - 00140002 Wrapped Exception (with status template): No bean named 'search.statsService' is defined",
 
  "callstack" :
  [
       ""      ,"org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'search.statsService' is defined"
      ,"org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:575)"
      ,"org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1111)"
      ,"org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:276)"
      ,"org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)"
      ,"org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:267)"
      ,"org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:191)"
      ,"org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1117)"
      ,"org.alfresco.repo.management.subsystems.SubsystemProxyFactory.locateBean(SubsystemProxyFactory.java:188)"
      ,"org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)"
      ,"org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)"
      ,"org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)"
      ,"com.sun.proxy.$Proxy197.query(Unknown Source)"
      ,"org.alfresco.repo.web.scripts.solr.StatsGet.executeImpl(StatsGet.java:119)"
      ,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:64)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:463)"
      ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:454)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:532)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:600)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:380)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:261)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)"
      ,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)"
      ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:727)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
      ,"org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
      ,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
      ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)"
      ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)"
      ,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)"
      ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)"
      ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)"
      ,"org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)"
      ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)"
      ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)"
      ,"org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)"
      ,"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)"
      ,"org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2403)"
      ,"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)"
      ,"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)"
      ,"org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)"
      ,"java.lang.Thread.run(Thread.java:745)"
      ,"org.springframework.extensions.webscripts.WebScriptException: 00140002 Wrapped Exception (with status template): No bean named 'search.statsService' is defined"
      ,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1126)"

  ],
 
  "server" : "Community v5.0.0 (r86473-b92) schema 8,006",
  "time" : "Jan 14, 2015 2:35:18 AM"
}


I guess that Solr did not install/register at all on the server. Where should I look for configuration error?

<cite>/opt/tomcat/conf/Catalina/localhost/solr4.xml</cite>:


<?xml version="1.0" encoding="utf-8"?>
<Context crossContext="true">
  <Environment name="solr/home"        type="java.lang.String" value="/opt/solr/home" override="true"/>
  <Environment name="solr/model/dir"   type="java.lang.String" value="/opt/solr/solrData/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/solr/solrData/content" override="true"/>
</Context>


I am slightly confused since some documentation indicates use of name "solr4/home" and some "solr/home" in the configuration. I tried both but without success. Any help is appreciated.
2 REPLIES 2

douglascrp
World-Class Innovator
World-Class Innovator
Solr home has to poing to the solr4 folder that if you followed this tutorial http://docs.alfresco.com/community/tasks/solr4-install-config.html , it should be something like:
/opt/alfresco/tomcat/solr4

This is my solr4.xml file content:

<?xml version="1.0" encoding="utf-8"?>
<Context debug="0" crossContext="true">
  <Environment name="solr/home"        type="java.lang.String" value="/opt/alfresco/tomcat/solr4" override="true"/>
  <Environment name="solr/model/dir"   type="java.lang.String" value="/opt/alfresco/tomcat/solr4/model" override="true"/>
  <Environment name="solr/content/dir" type="java.lang.String" value="/opt/alfresco/alf_data/solr4" override="true"/>
</Context>

Let me know if that helped or if you need something more.

This resembles my configuration.

I don't know what did I do wrong, but after installing 5.0.c from the start search is now functional!?