I installed Apache Solr 5.0.0 on OS X 10.10.2 using Homebrew and tried to work through the Solr Quick Start Tutorial. I hit a few snags. Probably nothing too daunting for an experienced Solr user, but that by definition is not the sort of person who is working their way through a tutorial. Here are the problems I encountered and how I got past them.
For starters, the paths listed in the Quick Start Tutorial do not align with what is actually installed. There is a bin/solr beneath the install directory, but the example post command is beneath libexec/bin, not bin. Likewise the docs folder passed to that post command is in libexec/docs.
Everything appears to work when you start the Solr server, but when you try to post documents you get a server error 500 for every document you try to add. The relevant stack is this.
Caused by: org.apache.solr.common.SolrException: Error loading class 'solr.extraction.ExtractingRequestHandler' at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:492) at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:423) at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:559) at org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:632) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.createRequestHandler(RequestHandlers.java:326) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:298) ... 30 more
The issue appears to be that ExtractingRequestHandler is not on the classpath. If you then go look at the log files via the web interface you see a “Can’t find (or read) directory to add to classloader” for several paths. The example configuration is expecting to see these paths beneath the Solr install directory, but they too are beneath libexec.
A fix is to create softlinks from ROOT/contrib to ROOT/libexec/contrib and ROOT/dist to ROOT/libexec/dist. With these in place, Solr loads without warnings and the post tool performs as expected.