Solr
  1. Solr
  2. SOLR-2574

upgrade SLF4J (primary motivation: simplifiy use of solrj)

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3, 4.0-ALPHA
    • Component/s: None
    • Labels:
      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.

      1. solrjtest.zip
        5 kB
        Gabriele Kahlout

        Issue Links

          Activity

          Hide
          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...

          Show
          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...
          Hide
          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).

          Show
          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).
          Hide
          Ceki Gulcu 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

          Show
          Ceki Gulcu 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
          Hide
          Gabriele Kahlout added a comment -

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

          Show
          Gabriele Kahlout added a comment - Nice, so the fix proposed would be to upgrade to SLF4J 1.6.
          Hide
          Ceki Gulcu added a comment -

          That is correct.

          Show
          Ceki Gulcu added a comment - That is correct.
          Hide
          Shalin Shekhar Mangar added a comment -

          slf4j is v1.6.1 in trunk

          Show
          Shalin Shekhar Mangar added a comment - slf4j is v1.6.1 in trunk
          Hide
          Gabriele Kahlout added a comment -

          thank you, what about 3_x branch?

          Show
          Gabriele Kahlout added a comment - thank you, what about 3_x branch?
          Hide
          Shalin Shekhar Mangar added a comment -

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

          Thanks for reminding Gabriele

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

          Committed revision 1135436.

          Show
          Shalin Shekhar Mangar added a comment - Committed revision 1135436.
          Hide
          Ryan McKinley added a comment -

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

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

          Bulk close for 3.3

          Show
          Robert Muir added a comment - Bulk close for 3.3

            People

            • Assignee:
              Shalin Shekhar Mangar
              Reporter:
              Gabriele Kahlout
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development