Announcement Announcement Module
Collapse
No announcement yet.
commons log api conflict Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • commons log api conflict

    I have a project I've just introduced spring ldap to and am getting new issue when I either run unit tests with ant or run unit tests within my ide:

    Caused by: org.apache.commons.logging.LogConfigurationExcepti on:.... You have more than one version of 'org.apache.commons.logging.Log' visible,....

    I've searched my classpath and looked into each jar and cannot see any conflict, however, I've also googled this issue and seen it is widely reported with commons logging.

    Is this a known issue with spring ldap, is there any common or know work arounds?

    thanks

    Tony

  • #2
    This is a commonly heard complaint with commons-logging, but I can't say it's a known issue with Spring LDAP. We have not heard of any problems related to commons-logging when running Spring LDAP unit tests from either Ant or IDE.

    Comment


    • #3
      I'm still working through it. It has to do with the dynamic discovery mechanism of JCL, Jakarta Commons Logging. In my case, this is a new project and the only spring code I'm using is Spring-LDAP so I can assure you it occurs with only Spring-LDAP.

      One solution I've found has to do with setting the org.apache.commons.logging.LogFactory property. That hasn't entirely solved it for me, I will post details when I finally solve it or decide to drop Spring-LDAP because of the issue. This is the first time using open source library has bit me. I'm still confident of resolving the issue but appreciate any help that can be offered.

      What was unusual for me was the initial Spring-LDAP code I used did not trigger any problem, it just cropped up after a while and the new code that triggered it doesn't look related to the problem, just coincidental.

      Comment


      • #4
        I think I've solved the problem by going to the commons 1.1 (latest) distribution. I no longer see the org.apache.commons.logging.LogConfigurationExcepti on. Instead I get a failure that I can reproduce and remove by changing my code. So, i had a bug in my unit test which generated a message from spring ldap but the LogConfigurationException was causing the whole test to fail with NullPointerException from the commons logging api. Not very good to have a logging api crash worse than the bad code I wrote. And, nice to see the problem wasn't specific to spring ldap.

        Thanks for your listening ear!

        Tony
        Last edited by tobermei; Sep 25th, 2007, 07:22 AM.

        Comment

        Working...
        X