You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Kissue Kissue <ki...@gmail.com> on 2011/12/08 12:03:36 UTC

solr.VelocityResponseWriter error in version 3.5.0

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.java:130)
        at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
        at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
        at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
        at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.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.java: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:637)
        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(LifecycleSupport.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(DelegatingMethodAccessorImpl.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

Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Kissue Kissue <ki...@gmail.com>.
Thanks Marcus. To resolve this problem i just added a shared lib folder for
my cores and added the velocity jars in this folder and that resolved the
error. I hope it was the right thing to do though.

Thanks.


On Thu, Dec 8, 2011 at 11:20 AM, Markus Jelsma
<ma...@openindex.io>wrote:

> From the changelog:
>
>
> 187
> * SOLR-2588: Moved VelocityResponseWriter back to contrib module in order
> to
> 188
> remove it as a mandatory core dependency. (Erik Hatcher)
>
>
>
>
> http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/CHANGES.txt?view=markup
>
>
>
> > 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:3
> > 89) 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.jav
> > a:130) at
> >
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
> >         at
> >
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilte
> > rConfig.java:295) at
> >
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFi
> > lterConfig.java:422) at
> >
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCo
> > nfig.java:115) at
> >
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4
> > 001) at
> > org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
> >         at
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:
> > 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:637
> > ) at
> >
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:56
> > 3) 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(LifecycleSuppo
> > rt.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:3
> > 9) at
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> > l.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:3
> > 73) ... 39 more
>

Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Markus Jelsma <ma...@openindex.io>.
From the changelog:


187
* SOLR-2588: Moved VelocityResponseWriter back to contrib module in order to 
188
remove it as a mandatory core dependency. (Erik Hatcher) 



http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/solr/CHANGES.txt?view=markup



> 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:3
> 89) 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.jav
> a:130) at
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
>         at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilte
> rConfig.java:295) at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFi
> lterConfig.java:422) at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCo
> nfig.java:115) at
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4
> 001) at
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
>         at
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:
> 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:637
> ) at
> org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:56
> 3) 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(LifecycleSuppo
> rt.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:3
> 9) at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.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:3
> 73) ... 39 more

Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Rocky Wang <ju...@gmail.com>.
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 <Di...@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" <er...@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

Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Erik Hatcher <er...@gmail.com>.
On Feb 2, 2012, at 14:54 , Dipti Srivastava wrote:

> Hrik,
> Thanks for you response. I have a question though...
> Will I be able to access the solr/admin console after disabling the
> velocity response writer? If so I can disbale it.

The admin console in Solr does not use the velocity response writer, so no worries.

> Otherwise, could you please advise on where and which libraries need to be
> copied and if any <lib> changes in solrconfig.xml are required.

Take a look at your solrconfig... if you've copied the example configuration and deployed into Tomcat, chances are all your <lib> references are incorrect.  Point them to the place where the libraries live for the features you need.

	Erik

> 
> Thanks!
> DIPTI
> 
> On 2/2/12 10:24 AM, "Erik Hatcher" <er...@gmail.com> wrote:
> 
>> Dipti - the fix is purely configuration.  There is no later version of
>> Solr officially released at this point, but it has been corrected on the
>> branch that will eventually become 3.6 (as well as the 4.0/trunk branch).
>> 
>> Follow the instructions mentioned below to fix this in your environment.
>> 
>>      Erik
>> 
>> On Feb 2, 2012, at 13:22 , Dipti Srivastava wrote:
>> 
>>> 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" <er...@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.ja
>>>>> va
>>>>> :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(ApplicationF
>>>>> il
>>>>> terConfig.java:295)
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati
>>>>> on
>>>>> FilterConfig.java:422)
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilt
>>>>> er
>>>>> Config.java:115)
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja
>>>>> va
>>>>> :4001)
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.core.StandardContext.start(StandardContext.java:465
>>>>> 1)
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
>>>>> av
>>>>> 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.jav
>>>>> a:
>>>>> 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:3
>>>>> 21
>>>>> )
>>>>>      at
>>>>> 
>>>>> 
>>>>> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
>>>>> up
>>>>> 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.ja
>>>>> va
>>>>> :39)
>>>>>      at
>>>>> 
>>>>> 
>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
>>>>> rI
>>>>> 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.ja
>>>>> va
>>>>> :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.
>>> 
>>> 
>> 
>> 
> 
> 
> This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
> 
> 


Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Dipti Srivastava <Di...@apollogrp.edu>.
Hrik,
Thanks for you response. I have a question though...
Will I be able to access the solr/admin console after disabling the
velocity response writer? If so I can disbale it.

Otherwise, could you please advise on where and which libraries need to be
copied and if any <lib> changes in solrconfig.xml are required.

Thanks!
DIPTI

On 2/2/12 10:24 AM, "Erik Hatcher" <er...@gmail.com> wrote:

>Dipti - the fix is purely configuration.  There is no later version of
>Solr officially released at this point, but it has been corrected on the
>branch that will eventually become 3.6 (as well as the 4.0/trunk branch).
>
>Follow the instructions mentioned below to fix this in your environment.
>
>       Erik
>
>On Feb 2, 2012, at 13:22 , Dipti Srivastava wrote:
>
>> 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" <er...@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.ja
>>>>va
>>>> :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(ApplicationF
>>>>il
>>>> terConfig.java:295)
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicati
>>>>on
>>>> FilterConfig.java:422)
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilt
>>>>er
>>>> Config.java:115)
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.core.StandardContext.filterStart(StandardContext.ja
>>>>va
>>>> :4001)
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.core.StandardContext.start(StandardContext.java:465
>>>>1)
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.j
>>>>av
>>>> 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.jav
>>>>a:
>>>> 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:3
>>>>21
>>>> )
>>>>       at
>>>>
>>>>
>>>>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleS
>>>>up
>>>> 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.ja
>>>>va
>>>> :39)
>>>>       at
>>>>
>>>>
>>>>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
>>>>rI
>>>> 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.ja
>>>>va
>>>> :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.
>>
>>
>
>


This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.



Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Erik Hatcher <er...@gmail.com>.
Dipti - the fix is purely configuration.  There is no later version of Solr officially released at this point, but it has been corrected on the branch that will eventually become 3.6 (as well as the 4.0/trunk branch).

Follow the instructions mentioned below to fix this in your environment.

	Erik

On Feb 2, 2012, at 13:22 , Dipti Srivastava wrote:

> 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" <er...@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.
> 
> 


Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Dipti Srivastava <Di...@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" <er...@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.



Re: solr.VelocityResponseWriter error in version 3.5.0

Posted by Erik Hatcher <er...@gmail.com>.
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.java:130)
>        at
> org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:94)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
>        at
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.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.java: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:637)
>        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(LifecycleSupport.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(DelegatingMethodAccessorImpl.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