Setting Solr Home (solr/home) in JNDI on Tomcat 5.5

28 01 2009

Here is another odd issue I encountered which I haven’t found a good solution for at the moment.  Here I only provide a not so elegant solution to work around the issue.  Let me know if you have a better solution so I can post it here.  

According to Solr’s documentation on Tomcat configuration, you can use JNDI to initialize the solr/home variable. 


When I tried the same configuration on Centos, Solr would not start.  In the error log, I found:

INFO: No /solr/home in JNDI

This is basically saying that Solr couldn’t find solr/home through JNDI.  Although solr/home is initialized under the Environment tag but for some odd reason, Solr does not see it in JNDI.  Perhaps my Tomcat install is whacked or Solr may be using some prefix or suffix to find this JNDI entry.  I haven’t had time to look into Solr’s source code to see if it really looks for solr/home through JNDI.  That’s why I said I don’t have a elegant solution to this issue.  My work around is pass a system property to the JVM via the “-D” parameter.  Modify (or catalina.bat if run on Windows) and add following to JAVA_OPTS.

JAVA_OPTS="... -Dsolr.solr.home=/my/solr/home"

Join the forum discussion on this post - (2) Posts



Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

ERROR: si-captcha.php plugin says GD image support not detected in PHP!

Contact your web host and ask them why GD image support is not enabled for PHP.

ERROR: si-captcha.php plugin says imagepng function not detected in PHP!

Contact your web host and ask them why imagepng function is not enabled for PHP.