Results 1 to 2 of 2

Thread: log4j:WARN No appenders could be found for logger (org.springframework.context.suppor

  1. #1
    Join Date
    May 2008
    Posts
    1

    Default log4j:WARN No appenders could be found for logger (org.springframework.context.suppor

    Hi there , I`m new working with spring. Here is the spring code where it fails

    import junit.framework.JUnit4TestAdapter;

    import org.junit.BeforeClass;
    import org.junit.Test;
    import org.springframework.context.support.FileSystemXmlA pplicationContext;

    import org.springframework.beans.factory.config.PropertyP laceholderConfigurer;
    import org.springframework.beans.factory.xml.XmlBeanFacto ry;
    import org.springframework.context.support.FileSystemXmlA pplicationContext;
    import org.springframework.context.ApplicationContext;
    import org.springframework.core.io.FileSystemResource;

    import static org.junit.Assert.assertTrue;

    /**
    * Unit test for simple App.
    */
    public class AppTest
    {

    private Document doc;

    @BeforeClass static public void createBeanFactory() {
    ApplicationContext ctx = new FileSystemXmlApplicationContext("configuration/context.xml");


    }

    @Test public void imprime(){

    if (doc != null){
    System.out.println(doc.getHead().getCajero());
    }else
    {
    System.out.println("esta vacio");
    }
    }

    }

    -------------------------------------------------------------------
    does anyone know where the problem could be located

    log4j:WARN No appenders could be found for logger (org.springframework.context.support.FileSystemXml ApplicationContext).
    log4j:WARN Please initialize the log4j system properly.

  2. #2

    Default Log4J

    I'm new at this, too, but it seems Spring uses Log4J by default, so to get rid of the warnings, add log4j to your app.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •