Unable to start Hybris Tomcat Server due to Solr Server issue

Sometimes, when we start hybris server, it does not start properly, instead it might end up with an error as below

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'defaultSolrServerService' defined in class path resource

Solr server is still not running after calling start command

Overview :

After 5.5 version, Hybris has come up with a standalone Solr server.

Hybris server tries to start the Solr server when we start Hybris server depending upon the property set in local.properties

Similarly, when we stop Hybris server, hybris server sends a signal to the solr server to stop

Sometimes, the signal is not sent by the hybris server to the solr server, which in turn results in a hung state.

Cause :

This issue generally occurs when Solr server is not stopped when we stopped Hybris server and is still running in the background

In this case, when we start hybris server, it will try to start the solr server but already running solr server is not able to instantiate/register the (bean) services which are required by the hybris server to communicate with the solr.

Hence it does not allow hybris server to start smoothly

Solution :

Solution 1 :

If we don’t want to use Solr, then set below key-value in hybris\config\local.properties

  1. solrserver.instances.default.autostart=false

This will start the hybris server without starting Solr and hence Product search functionality through Solr will not be working.

Solution 2 :

If we want to use Solr, We can just run below command from hybris\bin\platform folder
ant stopSolrServer
After running this command, we can start Hybris server smoothly.

About the Author

Karibasappa G C (KB)
Founder of javainsimpleway.com
I love Java and open source technologies and very much passionate about software development.
I like to share my knowledge with others especially on technology 🙂
I have given all the examples as simple as possible to understand for the beginners.
All the code posted on my blog is developed,compiled and tested in my development environment.
If you find any mistakes or bugs, Please drop an email to kb.knowledge.sharing@gmail.com

Connect with me on Facebook for more updates

Share this article on