Results 1 to 3 of 3

Thread: “SimpleLogger does not seem to be location aware” exception

  1. #1

    Default “SimpleLogger does not seem to be location aware” exception

    I'm getting an exception in a Spring 2.5 app on my first line of code:
    Code:
    ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
    I have commons-logging-1.1.1.jar configured as a project library.

    Here is the stack trace:

    java.lang.UnsupportedOperationException: The logger [org.slf4j.impl.SimpleLogger(org.springframework.co ntext.support.ClassPathXmlApplicationContext)] does not seem to be location aware.

    at org.apache.log4j.Category.log(Category.java:347)
    at org.apache.commons.logging.impl.Log4JLogger.info(L og4JLogger.java:199) atorg.springframework.context.support.AbstractAppl icationContext.
    prepareRefresh(AbstractApplicationContext.java:456 )
    at org.springframework.context.support.AbstractApplic ationContext.
    refresh(AbstractApplicationContext.java:394)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.(ClassPathXmlApplicationContext.j ava:139)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.(ClassPathXmlApplicationContext.j ava:83)

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,695

    Default

    You seem to want/be using slf4j (judging from the stacktrace) but also log4j and commons... That is somewhere going to bite you... Remove the commons-logging stuff, -sinclude the jcl-over-slf4j.jar (acts as commons-logging), and either use logback or the log4j binding (you seem to be wanting to use log4j).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

  3. #3

    Default

    This is a Spring/Hibernate project and somehow I had included both a versioned and an unversioned slf4j-simple.jar in the project as part of the Hibernate config. I deleted slf4j-simple.jar, leaving slf4j-simple-1.4.2.jar matching the slf4j-simple-api-1.4.2.jar that is part of the Hibernate distribution I'm using.

    It is now working fine w/ commons-logging-1.1.1. I tried removing commons-logging-1.1.1 but Spring complained.

Tags for this Thread

Posting Permissions

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