lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher (JIRA)" <>
Subject [jira] [Commented] (SOLR-2588) Make Velocity an optional dependency in SolrCore
Date Thu, 18 Aug 2011 19:17:27 GMT


Erik Hatcher commented on SOLR-2588:

Ugh, this got more complicated thanks to core tests relying on the example config.  Running
on a clean (ant clean) trunk, tests that rely on the example solrconfig.xml fail because the
Velocity contrib JAR isn't built yet.  I guess the other contribs don't fail because their
componentry is lazy loaded but response writers aren't.

For example:
ant test -Dtestcase=ShowFileRequestHandlerTest

    [junit] Testsuite: org.apache.solr.handler.admin.ShowFileRequestHandlerTest
    [junit] Tests run: 2, Failures: 0, Errors: 2, Time elapsed: 2.033 sec
    [junit] ------------- Standard Error -----------------
    [junit] 18.08.2011 15:13:09 org.apache.solr.common.SolrException log
    [junit] SCHWERWIEGEND: org.apache.solr.common.SolrException: Error loading class 'solr.VelocityResponseWriter'


If you run "ant dist" first, it works because the contrib apache-solr-velocity JAR is built

Ultimately response writers probably should be lazy loaded and only come into existence when
used the first time.  Thoughts?

> Make Velocity an optional dependency in SolrCore
> ------------------------------------------------
>                 Key: SOLR-2588
>                 URL:
>             Project: Solr
>          Issue Type: Wish
>    Affects Versions: 3.2
>            Reporter: Gunnar Wagenknecht
>            Assignee: Erik Hatcher
>            Priority: Minor
>             Fix For: 3.4, 4.0
>         Attachments: SOLR-2588.patch, SOLR-2588.patch, SOLR-2588.patch, 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>(
> 	at org.apache.solr.core.CoreContainer.create(
> 	at org.apache.solr.core.CoreContainer.load(
> 	at org.apache.solr.core.CoreContainer.load(
> {noformat}

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message