Managed to get this working. Changed my solrconfig for the one provided in 
velocity dir, repackaged the war file and redeployed on tomcat.

Although this seems like a ridiculously obvious thing to do, I somehow 
overlooked the repackaging aspect, this was where the problem was.

Thanks for the help Erik
________________________________________
From: Erik Hatcher [erik.hatc...@gmail.com]
Sent: 16 February 2011 08:06
To: solr-user@lucene.apache.org
Subject: Re: Errors when implementing VelocityResponseWriter

Well, you need to specify a path, relative or absolute, that points to the 
directory where the Velocity JAR file resides.

I'm not sure, at this point, exactly what you're missing.  But it should be 
fairly straightforward.  Solr startup logs the libraries it loads, so maybe 
that is helpful info.

1.4.1 - does it support <lib>?  (I'm not sure off the top of my head)

        Erik

On Feb 15, 2011, at 12:04 , McGibbney, Lewis John wrote:

> Hi Erik thank you for the reply
>
> I have placed all velocity jar files in my /lib directory. As explained 
> below, I have added relevant configuration to solrconfig.xml, I am just 
> wondering if the config instructions in the wiki are missing something? Can 
> anyone advise on this.
>
> As you mentioned, my terminal output suggests that the VelocityResponseWriter 
> class is not present and therefore the velocity jar is not present... however 
> this is not the case.
>
> I have specified <lib dir="./lib" /> in solrconfig.xml, is this enough or do 
> I need to use an exact path. I have already tried specifying an exact path 
> and it does not seem to work either.
>
> Thank you
>
> Lewis
> ________________________________________
> From: Erik Hatcher [erik.hatc...@gmail.com]
> Sent: 15 February 2011 06:48
> To: solr-user@lucene.apache.org
> Subject: Re: Errors when implementing VelocityResponseWriter
>
> looks like you're missing the Velocity JAR.  It needs to be in some Solr 
> visible lib directory.  With 1.4.1 you'll need to put it in <solr-home>/lib.  
> In later versions, you can use the <lib> elements in solrconfig.xml to point 
> to other directories.
>
>        Erik
>
> On Feb 14, 2011, at 10:41 , McGibbney, Lewis John wrote:
>
>> Hello List,
>>
>> I am currently trying to implement the above in Solr 1.4.1. Having moved 
>> velocity directory from $SOLR_DIST/contrib/velocity/src/main/solr/conf to my 
>> webapp /lib directory, then adding queryResponseWriter name="blah" and 
>> class="blah" followed by the responseHandler specifics I am shown the 
>> following terminal output. I also added <lib dir="./lib" /> in solrconfig. 
>> Can anyone suggest what I have not included in the config that is still 
>> required?
>>
>> Thanks Lewis
>>
>> SEVERE: org.apache.solr.common.SolrException: Error loading class 
>> 'org.apache.solr.response.VelocityResponseWriter'
>>       at 
>> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:375)
>>       at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:413)
>>       at org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:435)
>>       at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1498)
>>       at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1492)
>>       at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1525)
>>       at org.apache.solr.core.SolrCore.initWriters(SolrCore.java:1408)
>>       at org.apache.solr.core.SolrCore.<init>(SolrCore.java:547)
>>       at 
>> org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:137)
>>       at 
>> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:83)
>>       at 
>> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:273)
>>       at 
>> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
>>       at 
>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
>>       at 
>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
>>       at 
>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4382)
>>       at 
>> org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5040)
>>       at 
>> org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5035)
>>       at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>>       at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>>       at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>>       at 
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>>       at java.lang.Thread.run(Thread.java:662)
>> Caused by: java.lang.ClassNotFoundException: 
>> org.apache.solr.response.VelocityResponseWriter
>>       at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>       at java.security.AccessController.doPrivileged(Native Method)
>>       at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>       at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:627)
>>       at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>       at java.lang.Class.forName0(Native Method)
>>       at java.lang.Class.forName(Class.java:247)
>>       at 
>> org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:359)
>>       ... 21 more
>>
>> Glasgow Caledonian University is a registered Scottish charity, number 
>> SC021474
>>
>> Winner: Times Higher Education’s Widening Participation Initiative of the 
>> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
>> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>>
>> Winner: Times Higher Education’s Outstanding Support for Early Career 
>> Researchers of the Year 2010, GCU as a lead with Universities Scotland 
>> partners.
>> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html
>
> Email has been scanned for viruses by Altman Technologies' email management 
> service - www.altman.co.uk/emailsystems
>
> Glasgow Caledonian University is a registered Scottish charity, number 
> SC021474
>
> Winner: Times Higher Education’s Widening Participation Initiative of the 
> Year 2009 and Herald Society’s Education Initiative of the Year 2009.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html
>
> Winner: Times Higher Education’s Outstanding Support for Early Career 
> Researchers of the Year 2010, GCU as a lead with Universities Scotland 
> partners.
> http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

Email has been scanned for viruses by Altman Technologies' email management 
service - www.altman.co.uk/emailsystems

Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education’s Widening Participation Initiative of the Year 
2009 and Herald Society’s Education Initiative of the Year 2009.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Winner: Times Higher Education’s Outstanding Support for Early Career 
Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html

Reply via email to