I also just come across this issue. here are some tips: 1. create "lib" dir under your own $SOLR_HOME dir 2. copy .../dist/apache-solr-velocity-*-SNAPSHOT.jar to the dir 3. create "contrib" dir under $SOLR_HOME 4. copy all files under.../solr/contirb in solr source dir 5. update your own solrconfig.xml config file,
71 <lib dir="./contrib/extraction/lib" /> 72 <lib dir="./contrib/clustering/lib/" /> 73 <lib dir="./contrib/velocity/lib" /> 83 <lib dir="./contrib/clustering/lib/" /> 84 <lib dir="/total/crap/dir/ignored" /> Hope this helps 2012/2/3 Dipti Srivastava <dipti.srivast...@apollogrp.edu>: > Hi Erik, > The latest release from the apache site for Solr 3.5 still has this issue. > Where can I get a drop that has the fix for this issue? > Thanks, > Dipti > > On 12/9/11 1:22 PM, "Erik Hatcher" <erik.hatc...@gmail.com> wrote: > >>My bad. >> >>To clarify the issue here... the problem manifests itself only on Solr >>3.5 specifically when the example configuration is copied somewhere else >>(losing the relative path nature to the <lib> references). Generally >>this happens when folks want to deploy into Tomcat. In Solr 3.5, the >>VelocityResponseWriter was moved out of core and back to a contrib >>module. With this move, it became explicitly listed in the <lib> >>references by relative paths which are incorrect (not just for the >>VelocityResponseWriter but also for Solr Cell, Clustering, Data Import >>Handler, and the language identifier). All those other components are >>lazy loaded or not wired in by default so they don't cause a startup >>issue (but would not work!!!). The VelocityResponseWriter, however, is >>explicitly registered in the example configuration in solrconfig.xml as: >> >> <queryResponseWriter name="velocity" >>class="solr.VelocityResponseWriter" >>enable="${solr.velocity.enabled:true}"/> >> >>To fix the startup issue, if you don't want or care about the /browse >>interface or any other custom use of the VelocityResponseWriter you can >>either remove that line from solrconfig.xml (and restart Solr), or set >>the system property solr.velocity.enabled to false (something like doing >><export JAVA_OPTS="$JAVA_OPTS -Dsolr.velocity.enabled=false"> before >>launching Tomcat) or set that default value to false in solrconfig.xml. >>Note that if you do hit /browse after you've disabled the >>VelocityResponseWriter, you will get the standard Solr XML response >>returned as that is how Solr handles an unknown response writer >>parameter. If you do want the VelocityResponseWriter to work, you'll >>need to correct the <lib> references in solrconfig.xml to point to the >>appropriate locations. >> >>Apologies for this issue. I juggle Solr 3.x's and Solr trunk and various >>snapshots of trunk and I typically don't use Tomcat. >> >>I've reopened https://issues.apache.org/jira/browse/SOLR-2718 to get it >>backported to 3.x in time for a Solr 3.6 release. I'll tackle this in a >>couple of weeks. >> >>I'm also going to start a new solr-user thread about the >>VelocityResponseWriter and solicit folks opinions regarding its future. >> >> Erik >> >> >> >>On Dec 8, 2011, at 06:03 , Kissue Kissue wrote: >> >>> I just migrated to Solr 3.5 and whenever i start it up i get the error >>> below. Any ideas what might be wrong? Previously i didn't have to do >>> anything special to get it to work. HAs anything changed in solr 3.5? >>> >>> >>> 08-Dec-2011 10:45:03 org.apache.solr.common.SolrException log >>> SEVERE: org.apache.solr.common.SolrException: Error loading class >>> 'solr.VelocityResponseWriter' >>> at >>> >>>org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java >>>:389) >>> at >>>org.apache.solr.core.SolrCore.createInstance(SolrCore.java:425) >>> at >>> org.apache.solr.core.SolrCore.createInitInstance(SolrCore.java:447) >>> at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1556) >>> at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1550) >>> at org.apache.solr.core.SolrCore.initPlugins(SolrCore.java:1583) >>> at org.apache.solr.core.SolrCore.initWriters(SolrCore.java:1466) >>> at org.apache.solr.core.SolrCore.<init>(SolrCore.java:556) >>> at >>>org.apache.solr.core.CoreContainer.create(CoreContainer.java:463) >>> at >>>org.apache.solr.core.CoreContainer.load(CoreContainer.java:316) >>> at >>>org.apache.solr.core.CoreContainer.load(CoreContainer.java:207) >>> at >>> >>>org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.j >>>ava:130) >>> at >>> >>>org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:9 >>>4) >>> at >>> >>>org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFil >>>terConfig.java:295) >>> at >>> >>>org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Application >>>FilterConfig.java:422) >>> at >>> >>>org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilter >>>Config.java:115) >>> at >>> >>>org.apache.catalina.core.StandardContext.filterStart(StandardContext.java >>>:4001) >>> at >>> >>>org.apache.catalina.core.StandardContext.start(StandardContext.java:4651) >>> at >>> >>>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.jav >>>a:791) >>> at >>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) >>> at >>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546) >>> at >>> >>>org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:6 >>>37) >>> at >>> >>>org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java: >>>563) >>> at >>> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) >>> at >>> org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277) >>> at >>> >>>org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321 >>>) >>> at >>> >>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSup >>>port.java:119) >>> at >>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) >>> at >>> org.apache.catalina.core.StandardHost.start(StandardHost.java:785) >>> at >>> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >>> at >>> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:445) >>> at >>> org.apache.catalina.core.StandardService.start(StandardService.java:519) >>> at >>> org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >>> at org.apache.catalina.startup.Catalina.start(Catalina.java:581) >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>> at >>> >>>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java >>>:39) >>> at >>> >>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI >>>mpl.java:25) >>> at java.lang.reflect.Method.invoke(Method.java:597) >>> at >>>org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) >>> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) >>> Caused by: java.lang.ClassNotFoundException: solr.VelocityResponseWriter >>> at java.net.URLClassLoader$1.run(URLClassLoader.java:200) >>> at java.security.AccessController.doPrivileged(Native Method) >>> at java.net.URLClassLoader.findClass(URLClassLoader.java:188) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:303) >>> at >>>java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:592) >>> at java.lang.ClassLoader.loadClass(ClassLoader.java:248) >>> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) >>> at java.lang.Class.forName0(Native Method) >>> at java.lang.Class.forName(Class.java:247) >>> at >>> >>>org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java >>>:373) >>> ... 39 more >> >> > > > This message is private and confidential. If you have received it in error, > please notify the sender and remove it from your system. > > -- Juster