dcsimg
LOG4J and JUnit
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mira_mira
Posted On:   Monday, February 17, 2003 06:42 AM

Hi, Does anyone use JUnit and log4j together. I am getting error messages (see bellow) when I run my JUnit tests. Those tests has to test code that has log4j included. Code works fine without JUnit; I am not getting error messages. Thank you a lot, log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable. log4j:ERROR The class "org.apache.log4j.Appender" was loaded by log4j:ERROR [junit.runner.TestCaseClassLoader@1be16f5] whereas object of type log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [sun.misc.Launcher$AppClassLoader@12f6684]. log4j:ERROR Could not instantiate appe   More>>

Hi,

Does anyone use JUnit and log4j together.

I am getting error messages (see bellow) when I run my JUnit tests. Those tests has to test code that has log4j included. Code works fine without JUnit; I am not getting error messages.

Thank you a lot,

log4j:ERROR A "org.apache.log4j.ConsoleAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
log4j:ERROR The class "org.apache.log4j.Appender" was loaded by
log4j:ERROR [junit.runner.TestCaseClassLoader@1be16f5] whereas object of type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by [sun.misc.Launcher$AppClassLoader@12f6684].
log4j:ERROR Could not instantiate appender named "A1".

   <<Less

Re: LOG4J and JUnit

Posted By:   Anonymous  
Posted On:   Tuesday, March 11, 2003 01:54 AM

It sounds to me that you have multiple junit.jarĀ“s in your classpath.

Re: LOG4J and JUnit

Posted By:   baifeng_xu  
Posted On:   Monday, March 10, 2003 10:51 PM

Hi mira, I met the same problem as yours. and i don't know how to resolve this problem, if you have any solution for it.please tell me. thanx.
my e-mail: xbf825@hotmail.com
About | Sitemap | Contact