I'm writing an Axis client application. This application works fine by itself.
However, when I run my Junit tests for this application, I always get (blows up on start):
java.lang.ExceptionInInitializerError at org.apache.axis.client.Service.getAxisClient(Service.java:143) at org.apache.axis.client.Service.<init>(Service.java:152) at com.sforce.soap.enterprise.SforceServiceLocator.<init>(SforceServiceLocator.java:10) at com.adc.sar.crm.alertNotificationManager.SimpleLogin.sforceLogin(SimpleLogin.java:50) at com.adc.sar.crm.alertNotificationManager.SimpleLogin.<init>(SimpleLogin.java:40) at com.adc.sar.crm.alertNotificationManager.SimpleLoginTest.<init>(SimpleLoginTest.java:33) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at junit.framework.TestSuite.createTest(TestSuite.java:135) at junit.framework.TestSuite.addTestMethod(TestSuite.java:114) at junit.framework.TestSuite.<init>(TestSuite.java:75) at com.adc.sar.crm.alertNotificationManager.SimpleLoginTest.suite(SimpleLoginTest.java:45) at sun.reflectnull .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:111) at junit.swingui.TestRunner.runSuite(TestRunner.java:591) at junit.swingui.TestRunner$9.actionPerformed(TestRunner.java:283) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1786) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1839) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5100) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100) Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:532) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:272) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:414) at org.apache.axis.components.logger.LogFactory.getLog(LogFactory.java:76) at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:81) ... 44 more Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:416) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:525) ... 48 more Caused by: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JLogger does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:412) ... 49 more
I'm using the j2sdk 1.4.2_04, Axis 1.1 (which I downloaded yesterday to be sure I had the latest), and Junit 3.8.1.
How can I fix this? |