You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2011/07/14 08:07:59 UTC
[jira] [Updated] (SOLR-2588) Make Velocity an optional dependency
in SolrCore
[ https://issues.apache.org/jira/browse/SOLR-2588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Smiley updated SOLR-2588:
-------------------------------
Attachment: SOLR-2588_Don_t_fail_if_velocity_libs_not_present_.patch
The attached patch catches exceptions during attempts to instantiate the default query response writers, and logs a warning.
I tested that this had the desired effect manually by removing the velocity libs from the example app and going to the /browse UI. Oddly, the default behavior when the "wt" param fails to resolve is to use the default (XML) instead of throwing an error.
FYI I contemplated a lazy-instantiation strategy but in the end ditched it because it was more complicated than needed.
> Make Velocity an optional dependency in SolrCore
> ------------------------------------------------
>
> Key: SOLR-2588
> URL: https://issues.apache.org/jira/browse/SOLR-2588
> Project: Solr
> Issue Type: Wish
> Affects Versions: 3.2
> Reporter: Gunnar Wagenknecht
> Assignee: David Smiley
> Priority: Minor
> Fix For: 3.4, 4.0
>
> Attachments: SOLR-2588_Don_t_fail_if_velocity_libs_not_present_.patch
>
>
> In 1.4. it was fine to run Solr without Velocity on the classpath. However, in 3.2. SolrCore won't load because of a hard reference to the Velocity response writer in a static initializer.
> {noformat}
> ... ERROR org.apache.solr.core.CoreContainer - java.lang.NoClassDefFoundError: org/apache/velocity/context/Context
> at org.apache.solr.core.SolrCore.<clinit>(SolrCore.java:1447)
> 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)
> {noformat}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org