: Well, what I did was to create a lib directory within $SOLR_HOME (
: $SOLR_HOME/lib ), and that is where I put the VRM  jar found in the dist
: folder. Then what I did to the solrconfig was basicly to uncomment all of the
: <lib > statements and use <lib dir="../lib" />. The solrconfig is placed as
: normal in $SOLR_HOME/conf. Is it wrong to do so?

Hmmm... that may be the cause of the problem -- you don't need to do both.  
either add a <lib/> directive pointed at where you put VRW *OR* put it in 
$SOLR_HOME/lib ... don't do both (that may confuse your JVM classloader 
... i'd have to sit down and really think through what's happening there)

: To me this "QueryResponseWriter" thing doesn't necessarily have anything to do
: with VRM. Are all of the libraries from the /dist and contrib folder necessary

it has everything to do with VRW .. VelocityResponseWriter is a subclass 
of QueryResponseWriter, when VRW is 
loaded the JVM will attempt to rectify it's entire java class 
inheritence tree, using the classloader that VRW was loaded with, which 
then delegates up the tree of classloaders (looking at other specified 
lib dirs, and the solr.war, and the container classloader, and the 
bootloader, etc...).  if the classpath is "wonky" (ie: VRW exists in 
two places for example) then you can get errors like this even if class 
loader X has already loaded a base class (like QRW) if it's not consulted 
in the delegation.

: for startup? Because my routine in setting up solr is to only copy the /solr
: folder from /example and into my tomcat environment. So everything "above" the

well, for starters, you should not copy "example/solr" "into my tomcat 
environment" .. the only thing that needs copied into tomcat is the 
solr.war (either by putting it in the webapps directory, or by pointing to 
it fro ma context file) and then solr.war is the only thing that needs to 
know about (your copy of) the example/solr directory (either using a 
system property or jndi).  But as i said: classpaths are a pain in the 
ass, if you actually *copy* example/solr somewhere in your tomcat 
installation dir, it's *possible* that you have done so in a way that 
tomcat is finding things like the VRW jar in a "higher" classpath before 
it ever even loads the solr.war and the QRW base class.

: /solr folder does not exist. When I want to use additional features i mainly
: copy the needed jar files into $SOLR_HOME/lib as explained above. So this

that should work fine ... as long as:

  a) you aren't telling solr load the same jars more then once (see above 
about not needing <lib/> if you use $SOLR_HOME/lib) ... you can check if 
that's happening by looking at your log messages on solr startup and see 
if there are duplicates in the list of jars solr says it's adding ot hte 
classpath

  b) tomcat isn't already loading these jars ... this is harder to 
recognize, but the safe way to do it is to keep all of these jars the hell 
away from tomcat.


-Hoss

Reply via email to