I'm trying to get a Solr4 install going, building without slf4j
bindings. I am using branch_4x from svn, and using a homegrown init
script. That script is modeled on what I already have working for
version 3.5.0. Solr and Jetty live in /opt/solr4, and the init script
does a chdir to that directory before firing up jetty. I am pointing
solr.home at /index/solr4, using -Dsolr.solr.home.
/index/solr4/solr.xml exists and has sharedLib="lib".
If I use the standard .war file, sharedLib works as I would expect it
to. The solr.xml file is found and it finds the sharedLib directory
just fine, as you can see from this log excerpt:
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
locateSolrHome
INFO: using system property solr.solr.home: /index/solr4
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader <init>
INFO: new SolrResourceLoader for deduced Solr Home: '/index/solr4/'
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/mysql-connector-java-5.1.21-bin.jar'
to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/slf4j-api-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/log4j-1.2.17.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/slf4j-log4j12-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/log4j-over-slf4j-1.7.2.jar' to
classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding 'file:/index/solr4/lib/jcl-over-slf4j-1.7.2.jar' to classloader
Oct 13, 2012 3:38:37 AM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
The problem that I am having is with the -excl-slf4j.war file, which I
am trying to use in order to use log4j instead of jdk logging. When I
do that, it seems to be unable to find the sharedLib folder in
solr.xml. Because it can't find any slf4j bindings at all, I cannot see
what's going on in the log. Entire log included:
2012-10-13 02:21:52.972:INFO:oejs.Server:jetty-8.1.2.v20120308
2012-10-13 02:21:52.988:INFO:oejs.NCSARequestLog:Opened
/opt/solr4/logs/request.2012_21_13.log
2012-10-13 02:21:52.992:INFO:oejdp.ScanningAppProvider:Deployment
monitor /opt/solr4/contexts at interval 0
2012-10-13 02:21:52.995:INFO:oejd.DeploymentManager:Deployable added:
/opt/solr4/contexts/solr.xml
2012-10-13 02:21:53.710:INFO:oejw.StandardDescriptorProcessor:NO JSP
Support for /solr, did not find org.apache.jasper.servlet.JspServlet
2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war
2012-10-13 02:21:53.732:INFO:oejsh.ContextHandler:started
o.e.j.w.WebAppContext{/solr,file:/opt/solr4/solr-webapp/webapp/},/opt/solr4/webapps/solr.war
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for
further details.
I also tried putting the slf4j jars in /opt/solr4/lib (jetty's lib
directory). Unsurprisingly, there was no change. Where can I put the
jars to make this work, and how to I tell jetty/solr where to find
them? I would very much like to avoid having to specify individual jars
on the java commandline, because of the upgrade pain that will cause.
Thanks,
Shawn