lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <>
Subject [jira] Commented: (SOLR-2303) remove unnecessary (and problematic) log4j jars in contribs
Date Tue, 18 Jan 2011 18:40:44 GMT


Erick Erickson commented on SOLR-2303:

Ah, I think the light finally dawns. And helps explain why I'm getting different results on
different machines/environments

There's a reason "they" don't often let me near build systems.....

Ok, splendid. I suggested removing things to see if it was a bad idea. It is. Almost.

So does it still make sense to remove the log4j jars in contrib in the 3_x branch?

I did as you suggested, and of course started getting "classNotFound" errors for JUnitTestRunner
and so-on. So I included these lines in Solr's build.xml.

    <pathelement path="${common-solr.dir}/../lucene/lib/ant-junit-1.7.1.jar" />
    <pathelement path="${common-solr.dir}/../lucene/lib/ant-1.7.1.jar" />
    <pathelement path="${common-solr.dir}/../lucene/lib/junit-4.7.jar" />
in place of java.class.path and all is well. Is this the path you'd go down? I'm not very
comfortable having Solr reach over into Lucene, but what do I know?

It should be fairly obvious by now that I'm not very ant-sophisticated, is there a preferred
way of doing this? Because if this is OK, it seems we should also remove junit-4.7.jar from
../solr/lib and point anything that needs it should path to ../lucene/lib as well.

I'm currently testing similar changes on the 3_x build with log4j files removed. But that
worked before as well.....

Let me know

> remove unnecessary (and problematic) log4j jars in contribs
> -----------------------------------------------------------
>                 Key: SOLR-2303
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: Build
>            Reporter: Robert Muir
>             Fix For: 4.0
>         Attachments: SOLR-2303.patch
> In solr 4.0 there is log4j-over-slf4j.
> But if you have log4j jars also in the classpath (e.g. contrib/extraction, contrib/clustering)
you can get strange errors such as:
> java.lang.NoSuchMethodError: org.apache.log4j.Logger.setAdditivity(Z)V
> So I think we should remove the log4j jars in these contribs, all tests pass with them

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message