: I'm trying to get a Solr4 install going, building without slf4j bindings. I ... : 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: ... : INFO: Adding 'file:/index/solr4/lib/slf4j-api-1.7.2.jar' to classloader ... : 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:
I think one, or both, of us is confused about how the dist-war-excl-slf4j target is intended to be used. I'm fairly certain you can't try to use slf4j/log4j from the sharedLib -- because at that point a lot of solr has already been initialized and already started doing logging so slf4j should have already tried to resolve the binding it should use, found nothing, and picked it's default NOP implementation -- as you can see in your logs... : 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 *believe* the intended way to us the -excl-slf4j.war is by having the servlet container load both the log4j.jar and the slf4j binding for log4j -- either by putting it in the jetty/lib, or by specifing them in the runtime classpath -- but I think you also need to configure log4j at the servlet container level so that it will be initialized. : 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 did you move them or copy them, because it wouldn't suprise me if having duplicate copies of those slf4j jars in sharedLib broke logging in solr even if things were configured and working properly at the jetty level. -Hoss