Announcement Announcement Module
No announcement yet.
“SimpleLogger does not seem to be location aware” exception Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • “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:
    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(] does not seem to be location aware.

    at org.apache.log4j.Category.log(
    at icationContext.
    prepareRefresh( )
    at ationContext.
    at plicationContext.(ClassPathXmlApplicationContext.j ava:139)
    at plicationContext.(ClassPathXmlApplicationContext.j ava:83)

  • #2
    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).


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