Thanks Ahmet. I had everything except solr-velocity-4.6.1.jar (which I can understand now). Thought it was now part of solr-core itself. Copied from dist/ to collection1/lib. Its working.
Thanks On 17 March 2014 13:03, Ahmet Arslan <iori...@yahoo.com> wrote: > Hi > > instanced is collection1 in your case. Putting jars under > /solr/collection1/lib should work. What jar files did you put there? Did > you include > > solr-velocity-4.6.1.jar > commons-beanutils-1.7.0.jar > commons-collections-3.2.1.jar > velocity-1.7.jar > velocity-tools-2.0.jar > > > > > > On Monday, March 17, 2014 2:55 PM, Umapathy S <nsupat...@gmail.com> wrote: > I am running solr 4.6.1. Trying to get velocity running, but it throws > class not found error. solrconfig.xml already has the > VelocityResponseWriter added. > > The Exception stack trace (snipped) > > {msg=lazy loading > error,trace=org.apache.solr.common.SolrException: lazy loading error > at > org.apache.solr.core.SolrCore$LazyQueryResponseWriterWrapper.getWrappedWriter(SolrCore.java:2305) > at > org.apache.solr.core.SolrCore$LazyQueryResponseWriterWrapper.getContentType(SolrCore.java:2324) > at > org.apache.solr.servlet.SolrDispatchFilter.writeResponse(SolrDispatchFilter.java:688) > ... > Caused by: org.apache.solr.common.SolrException: Error loading class > 'solr.VelocityResponseWriter' > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:470) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:401) > at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:526) > at > org.apache.solr.core.SolrCore.createQueryResponseWriter(SolrCore.java:611) > at org.apache.solr.core.SolrCore.access$300(SolrCore.java:133) > at > org.apache.solr.core.SolrCore$LazyQueryResponseWriterWrapper.getWrappedWriter(SolrCore.java:2300) > ... 29 more > Caused by: java.lang.ClassNotFoundException: solr.VelocityResponseWriter > at java.net.URLClassLoader$1.run(URLClassLoader.java:366) > at java.net.URLClassLoader$1.run(URLClassLoader.java:355) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:354) > at java.lang.ClassLoader.loadClass(ClassLoader.java:425) > at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789) > at java.lang.ClassLoader.loadClass(ClassLoader.java:358) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:270) > at > org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:454) > ... 34 more > ,code=500} > > I thought the solr.VelocityResponseWriter is built into solr core itself. > Is it not the case with 4.6.1? > > I have tried creating a lib directory inside example/solr/collection1 and > copying the velocity jars from contrib. I have also tried to copy those to > example/lib (this has all jetty dependencies). This hasnt worked either. > > The wiki says put it in instanceDir/lib. What is the instanceDir here? Is > there anywhere else I should create a lib dir and try? > > Thanks > > Umapathy > >