Announcement Announcement Module
Collapse
No announcement yet.
log4j:WARN No appenders could be found for logger (org.springframework.context.suppor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment

    Working...
    X