<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <br>
    I've recently been testing our applications on log4j 1.6.1 and also
    used the log4j-over-slf4j bridge.<br>
    <br>
    Everything has worked beautifully thus far with but one exception:
    one of the developers authored some Ant-related code which registers
    a listener:<br>
    <br>
    Project antProj = new org.apache.tools.ant.Project();<br>
    Log4jListener log4jListener = new
    org.apache.tools.ant.listener.Log4jListener();<br>
    antProj.addBuildListener(log4jListener);<br>
    <br>
    This results in the following Exception:<br>
    <br>
    java.lang.NoSuchMethodError:
    org.apache.log4j.Logger.getAllAppenders()Ljava/util/Enumeration;<br>
    &nbsp;&nbsp;&nbsp; at
org.apache.tools.ant.listener.Log4jListener.&lt;init&gt;(Log4jListener.java:51)<br>
    &nbsp;&nbsp;&nbsp; at
com.telesoft.ant.AntTargetLauncher.executeAntTask(AntTargetLauncher.java:32)<br>
    &nbsp;&nbsp;&nbsp; ...<br>
    <br>
    I stubbed out this method in org/apache/log4j/Category.java and got
    past that hurdle only to encounter the following:<br>
    <br>
    java.lang.NoClassDefFoundError:
    org/apache/log4j/helpers/NullEnumeration<br>
    &nbsp;&nbsp;&nbsp; at
org.apache.tools.ant.listener.Log4jListener.&lt;init&gt;(Log4jListener.java:51)<br>
    &nbsp;&nbsp;&nbsp; at
com.telesoft.ant.AntTargetLauncher.executeAntTask(AntTargetLauncher.java:32)<br>
    &nbsp;&nbsp;&nbsp; ...<br>
    <br>
    How does one replace log4j/Ant integration via slf4j?<br>
    <br>
    Thanks.<br>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <span style="font-family: Verdana,Geneva,sans-serif; font-size:
        18px; color: rgb(0, 51, 102);">Scott Dudley</span><br>
      <span style="font-size: 12px; font-family:
        Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);">Senior
        Developer </span>
      <p style="font-size: 12px; font-family: Verdana,Geneva,sans-serif;
        color: rgb(102, 102, 102);">Telesoft Corp. | 1661 E. Camelback
        Rd., Suite 300 | Phoenix, AZ, 85016</p>
      <p style="font-size: 12px; font-family:
        Verdana,Geneva,sans-serif;"><strong><span style="color: rgb(255,
            153, 0);">o:</span></strong> <span style="font-size: 12px;
          font-family: Verdana,Geneva,sans-serif; color: rgb(102, 102,
          102);">(602) 308-1115</span><strong><span style="color:
            rgb(255, 153, 0);"> </span></strong><span style="color:
          rgb(255, 153, 0);"><font color="#999999">|</font> </span><strong><span
            style="color: rgb(255, 153, 0);">f:</span></strong> <span
          style="font-size: 12px; font-family:
          Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);">(602)
          308-1300</span> <font color="#8c8c8c">| </font><strong><span
            style="color: rgb(255, 153, 0);">w:</span></strong> <span
          style="font-size: 12px; font-family:
          Verdana,Geneva,sans-serif; color: rgb(102, 102, 102);"><a
            href="http://www.telesoft.com">www.telesoft.com</a></span> <font
          color="#8c8c8c">
        </font></p>
      <p><span style="font-family: Verdana,Geneva,sans-serif; font-size:
          12px;"><font color="#8c8c8c"><strong style="font-weight: bold;
              padding: 0px; margin: 0px;"><span style="color: rgb(255,
                153, 0); padding: 0px; margin: 0px;"><a
                  href="http://www.telesoft.com/blog">TEM Edge Blog</a>
              </span></strong><span style="color: rgb(255, 153, 0);
              padding: 0px; margin: 0px;"><span style="color: rgb(153,
                153, 153);">|</span></span><strong style="font-weight:
              bold; padding: 0px; margin: 0px;"><span style="color:
                rgb(255, 153, 0); padding: 0px; margin: 0px;"> <a
                  href="http://www.twitter.com/_Telesoft">Twitter</a> </span></strong><span
              style="color: rgb(255, 153, 0); padding: 0px; margin:
              0px;"><span style="color: rgb(153, 153, 153);">|</span></span><strong
              style="font-weight: bold; padding: 0px; margin: 0px;"><span
                style="color: rgb(255, 153, 0); padding: 0px; margin:
                0px;"> <a
                  href="http://www.facebook.com/pages/Telesoft-Corp/76397971661">Facebook<br>
                  <br>
                </a><a title="Telesoft Conference 2011"
                  href="http://www.telesoftconference.com"
                  target="_blank">Join us at Telesoft Connections 2011.
                  Learn more now!</a></span></strong></font></span></p>
    </div>
  </body>
</html>