Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-2574

upgrade SLF4J (primary motivation: simplifiy use of solrj)

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.3, 4.0-ALPHA
    • None
    • None

    Description

      Whatever the merits of slf4j, a quick solrj test should work.

      I've attached a sample 1-line project with dependency on solrj-3.2 on run it prints:

      java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
      	at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.<clinit>(CommonsHttpSolrServer.java:72)
      	at com.mysimpatico.solrjtest.App.main(App.java:12)
      

      Uncomment the nop dependency and it will work.

      Attachments

        1. solrjtest.zip
          5 kB
          Gabriele Kahlout

        Issue Links

          Activity

            ryantxu Ryan McKinley added a comment -

            So you are suggesting that solrj should ship with no-opp?

            I'm not sure that is great behavior – the point of SLF4j to let people choose what framework to use...

            ryantxu Ryan McKinley added a comment - So you are suggesting that solrj should ship with no-opp? I'm not sure that is great behavior – the point of SLF4j to let people choose what framework to use...
            simpatico Gabriele Kahlout added a comment - - edited
            {quoute}

            I'm not sure that is great behavior – the point of SLF4j to let people choose what framework to use...

            It'd make some sense if I'm re-building solrj, but as a client that (to me) totally unacceptable. If slf4j is such a great thing, that's ! the way to promote it, you get a build failure because of this slf4j and then go figure out the 'simplest thing that could possible work'[Extreme Programming].
            I'm !alone with the issue, others have posted about it (I'm the one taking the time to post an issue).

            simpatico Gabriele Kahlout added a comment - - edited {quoute} I'm not sure that is great behavior – the point of SLF4j to let people choose what framework to use... It'd make some sense if I'm re-building solrj, but as a client that (to me) totally unacceptable. If slf4j is such a great thing, that's ! the way to promote it, you get a build failure because of this slf4j and then go figure out the 'simplest thing that could possible work' [Extreme Programming] . I'm !alone with the issue, others have posted about it (I'm the one taking the time to post an issue).

            Note that SLF4J-enabling your library implies the addition of only a single mandatory dependency, namely slf4j-api.jar. As of SLF4J 1.6, if no binding is found on the class path, then SLF4J will default to a no-operation implementation. See also http://slf4j.org/manual.html#libraries

            ceki@qos.ch Ceki GĂĽlcĂĽ added a comment - Note that SLF4J-enabling your library implies the addition of only a single mandatory dependency, namely slf4j-api.jar. As of SLF4J 1.6, if no binding is found on the class path, then SLF4J will default to a no-operation implementation. See also http://slf4j.org/manual.html#libraries

            Nice, so the fix proposed would be to upgrade to SLF4J 1.6.

            simpatico Gabriele Kahlout added a comment - Nice, so the fix proposed would be to upgrade to SLF4J 1.6.

            That is correct.

            ceki@qos.ch Ceki GĂĽlcĂĽ added a comment - That is correct.

            slf4j is v1.6.1 in trunk

            shalin Shalin Shekhar Mangar added a comment - slf4j is v1.6.1 in trunk

            thank you, what about 3_x branch?

            simpatico Gabriele Kahlout added a comment - thank you, what about 3_x branch?

            slf4j in branch 3x still needs to be updated to 1.6

            Thanks for reminding Gabriele

            shalin Shalin Shekhar Mangar added a comment - slf4j in branch 3x still needs to be updated to 1.6 Thanks for reminding Gabriele

            Committed revision 1135436.

            shalin Shalin Shekhar Mangar added a comment - Committed revision 1135436.
            ryantxu Ryan McKinley added a comment -

            since this is not a bug... lets change the status

            ryantxu Ryan McKinley added a comment - since this is not a bug... lets change the status
            rcmuir Robert Muir added a comment -

            Bulk close for 3.3

            rcmuir Robert Muir added a comment - Bulk close for 3.3

            People

              shalin Shalin Shekhar Mangar
              simpatico Gabriele Kahlout
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: