Ceki,

When I run a JUnit TestCase which initiate Torque in the setUp() method,

I got the following messages from log4j:

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@45fde0] whereas object of
type
log4j:ERROR "org.apache.log4j.ConsoleAppender" was loaded by
[sun.misc.Launcher$AppClassLoader@ac738].
log4j:ERROR Could not instantiate appender named "STDOUT".
log4j:ERROR A "org.apache.log4j.FileAppender" 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@45fde0] whereas object of
type
log4j:ERROR "org.apache.log4j.FileAppender" was loaded by
[sun.misc.Launcher$AppClassLoader@ac738].
log4j:ERROR Could not instantiate appender named "default".
log4j:ERROR A "org.apache.log4j.FileAppender" 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@45fde0] whereas object of
type
log4j:ERROR "org.apache.log4j.FileAppender" was loaded by
[sun.misc.Launcher$AppClassLoader@ac738].
log4j:ERROR Could not instantiate appender named "org.apache.torque".
log4j:WARN No appenders could be found for logger
(org.apache.torque.Torque).
log4j:WARN Please initialize the log4j system properly.

The exception that I got from my unit test was:
java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException:
...(the line was cut from on the Junit console)

After I posted my problem to log4j-dev, I found that it should be posted

to log4j-user so I posted it again to log4j-user right after.

Pricilla Yin







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

Reply via email to