axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Kinsman" <>
Subject Re: commons-logging issue (maybe JUnit-related)
Date Mon, 02 Dec 2002 01:33:54 GMT

The solution to this is hinted at in the JUnit documentation, and is
easy to implement.  The problem arises because JUnit uses multiple class
loaders across test cases.  However it has a list of packages it knows
NOT to reload all the time - and you can add to this list.
Copy junit\runner\ from junit.jar (e.g.
foo\junit\runner\, and place your copy earlier in
the classpath than junit.jar.  (e.g. classpath should have "foo" before
junit.jar).  Now add the following to your

# This one is needed to stop exceptions in apache logging (& other areas
in Axis too!)
# due to reloading by classloader for each test case

I hope this helps!

Steve Kinsman

                    Mitch Gitman                                                         
                    <mgitman@usa.        To:             
                    net>                 cc:                                          
                                         Subject:     Re: commons-logging issue (maybe JUnit-related)
                    respond to                                                           

Sure enough, this problem does not arise when running my Axis client
directly. So where's the conflict with JUnit? The JUnit archive doesn't
define these classes.

At 11:45 29.11.02 -0800, you wrote:
>I'm trying to run some JUnit tests on an Axis client. My client class'
>constructor calls the default constructor for
>org.apache.axis.client.Service. This causes an exception to crop up:
>at org.apache.axis.client.Service.<init>(
>Caused by: org.apache.commons.logging.LogConfigurationException: ...
>org.apache.commons.logging.impl.Jdk14Logger does not implement Log
>         at

>Now, Jdk14Logger does implement Log; both are in commons-logging.jar.
>first, I thought this was a simple classloading issue, that somehow an
>inconsistent version of the class or interface was being picked up. But

>after moving common-logging.jar to the head of my classpath list for
>invoking JUnit, I still got the error. And anyway, I don't see
>or Log elsewhere in the classpath.
>I suspect this issue has something to do with JUnit, although I haven't
>technical reason. Just, "Jdk14Logger does not implement Log" has made
>way to the Cactus (JUnit for webapps) mailing list. Next, I'm going to
>running my Axis client directly rather than through JUnit.

View raw message