Hello,
I've got a small question about junit and it's interaction
with the logging component of commons.
When I try to run my unit tests with
java junit.textui.TestRunner MytestClass
everything works fine.
However, when I use the junit gui either
java junit.awtui.TestRunner
or
java junit.swingui.TestRunner
I get an exception. Not sure if I have to look for the
solution in junit or the logging component settings...
my classpath:
classes:/home/bdg/src/lib.repo/commons-logging-1.0.jar:/home/bdg/src/lib.repo/commons-beanutils-1.3.jar:/home/bdg/src/lib.repo/commons-collections-2.0.jar:/home/bdg/src/lib.repo/commons-digester-1.2.jar:/home/bdg/src/lib.repo/xerces-2.0.0.jar:/home/bdg/src/lib.repo/xml-apis-2.0.2.jar:/home/bdg/src/lib.repo/junit-3.7.jar:/usr/local/jakarta-commons/betwixt/target/classes
Here is the exception:
java junit.swingui.TestRunner
java.lang.ExceptionInInitializerError
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:53)
at junit.swingui.TestRunner.runSuite(TestRunner.java:612)
at junit.swingui.TestRunner$10.actionPerformed(TestRunner.java:296)
at
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1767)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1820)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419)
at
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:258)
at java.awt.Component.processMouseEvent(Component.java:5021)
at java.awt.Component.processEvent(Component.java:4818)
at java.awt.Container.processEvent(Container.java:1525)
at java.awt.Component.dispatchEventImpl(Component.java:3526)
at java.awt.Container.dispatchEventImpl(Container.java:1582)
at java.awt.Component.dispatchEvent(Component.java:3367)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3359)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3074)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3004)
at java.awt.Container.dispatchEventImpl(Container.java:1568)
at java.awt.Window.dispatchEventImpl(Window.java:1581)
at java.awt.Component.dispatchEvent(Component.java:3367)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:445)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:191)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:144)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:130)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:98)
Caused by: org.apache.commons.logging.LogConfigurationException:
java.lang.ClassCastException: org.apache.commons.logging.impl.LogFactoryImpl
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:506)
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
at
net.myc4a.util.xml.TestBeanReader.<clinit>(TestBeanReader.java:36)
... 30 more
Caused by: java.lang.ClassCastException:
org.apache.commons.logging.impl.LogFactoryImpl
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:504)
... 33 more
greetings,
Bart De Gruyter
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>