Hi, Michael.

The commons logging must be excluded from the JUnit's own classloading system.
Add the following line to junit/runner/excluded.properties -file contained in the
junit.jar.


excluded.9=org.apache.commons.logging.*

(in which you should replace the digit 9 with the lowest positive digit that is
available in the file). As an example, my JUnit version 3.8.1 file contents after
this operation are as follows:


#
# The list of excluded package paths for the TestCaseClassLoader
#
excluded.0=sun.*
excluded.1=com.sun.*
excluded.2=org.omg.*
excluded.3=javax.*
excluded.4=sunw.*
excluded.5=java.*
excluded.6=org.w3c.dom.*
excluded.7=org.xml.sax.*
excluded.8=net.jini.*
excluded.9=org.apache.commons.logging.*

Yours,
Jussi

On Jan 7, 2004, at 10:30 PM, Michael Czeiszperger wrote:


On Jan 7, 2004, at 9:49 PM, Simon Kitching wrote:


I believe this is commonly caused by classloader problems.
Are you running this code in a container of some sort?

When SimpleLog and Log are loaded by different classloaders, the
"instance-of" operation can report false.


Thanks for the help! I'm running the code inside the IDEA development environment from within a JUnit test. The sample code is being run from a class file on the CLASSPATH and the HttpClient and Logger JARS are both on the CLASSPATH as well. I don't see how different classloaders could be involved, but that's definitely a possibility.


--------------------------------
Michael Czeiszperger
czei at webperformanceinc dot com
Web Performance, Inc.
919-845-7601

--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to