What version of Solr? Try switching to
class="solr.VelocityResponseWriter", and if that doesn't work use
class="org.apache.solr.request.VelocityResponseWriter". The first
form is the recommended way to do it. The actual package changed in
trunk not too long ago.
Erik
On May 9, 2010, at 10:43 AM, Andrew Clegg wrote:
Hi,
I'm trying to get the Velocity / Solritas feature to work for one
core of a
two-core Solr instance, but it's not playing nice.
I know the right jars are being loaded, because I can see them
mentioned in
the log, but still I get a class not found exception:
09-May-2010 15:34:02 org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding
'file:/var/www/smesh/current/config/solr/twitter/lib/apache-solr-
velocity-1.4.1-dev.jar'
to classloader
09-May-2010 15:34:02 org.apache.solr.core.SolrResourceLoader
replaceClassLoader
INFO: Adding
'file:/var/www/smesh/current/config/solr/twitter/lib/
velocity-1.6.1.jar' to
classloader
09-May-2010 15:34:02 org.apache.solr.core.SolrResourceLoader
replaceClassLoader
...
SEVERE: org.apache.solr.common.SolrException: Error loading class
'org.apache.solr.response.VelocityResponseWriter'
at
org
.apache
.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:373)
at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:413)
...
I've attached the whole log, as it's quite big, and Nabble thinks
it's spam
because it has "too many 'anal' words" ;-)
http://n3.nabble.com/file/n787256/solr.log solr.log
Here is the appropriate part of my solrconfig.xml for the core which
is
attempting to load Velocity:
<queryResponseWriter name="velocity"
class="org.apache.solr.response.VelocityResponseWriter"/>
<requestHandler name="/itas" class="solr.SearchHandler">
<lst name="defaults">
<str name="v.template">browse</str>
<str name="v.properties">velocity.properties</str>
<str name="v.contentType">text/html;charset=UTF-8</str>
<str name="title">Solritas</str>
<str name="wt">velocity</str>
<str name="defType">standard</str>
<str name="q.alt">*:*</str>
<str name="rows">10</str>
<str name="fl">*,score</str>
<str name="facet">on</str>
<str name="facet.field">author_name</str>
<str name="facet.mincount">1</str>
<str name="qf">
</str>
</lst>
<!--<lst name="invariants">-->
<!--<str
name="v.base_dir">/solr/contrib/velocity/src/main/templates</str>-->
<!--</lst>-->
</requestHandler>
Any ideas?
Many thanks, once again!
Andrew.
--
View this message in context:
http://lucene.472066.n3.nabble.com/ClassNotFoundException-org-apache-solr-response-VelocityResponseWriter-tp787256p787256.html
Sent from the Solr - User mailing list archive at Nabble.com.