Hi all,

I've been googling all day and I'm stuck. I'm trying to run a junit
test case in eclipse 3.1 calling an axis2 web service running in
jboss, and axis2 depends on HttpClient. I get this stack trace:

java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
      at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
      at 
org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(AbstractHTTPSender.java:608)
      at 
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:54)
      at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:298)
      at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206)
      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:616)
      at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:328)
      at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279)
      at 
br.com.atlantico.maragato.webservices.endpoint.MaragatoServiceStub.findElementoGerenciadoById(MaragatoServiceStub.java:313)
      at 
br.com.atlantico.maragato.webservices.WSElementoGerenciadoTest.testFindElementoGerenciadoHappyDay(WSElementoGerenciadoTest.java:62)
      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:585)
      at junit.framework.TestCase.runTest(TestCase.java:154)
      at junit.framework.TestCase.runBare(TestCase.java:127)
      at junit.framework.TestResult$1.protect(TestResult.java:106)
      at junit.framework.TestResult.runProtected(TestResult.java:124)
      at junit.framework.TestResult.run(TestResult.java:109)
      at junit.framework.TestCase.run(TestCase.java:118)
      at junit.framework.TestSuite.runTest(TestSuite.java:208)
      at junit.framework.TestSuite.run(TestSuite.java:203)
      at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
      at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
      at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

The commons-loggin.jar is configured in the normal eclipse way. I'm
running commons-logging 1.04, but tried to upgrade to 1.1 with no
luck. I tried
putting the commons.logging jar under jdk1.5.0_03/jre/lib/ext - no
luck. I tried this, still no luck:

  protected void setUp() throws Exception {
          
Thread.currentThread().setContextClassLoader(ClassLoader.getSystemClassLoader());
  }

I'm out of ideas. Any help very much appreciated. I just need this
junit test case to run in eclipse.

Robert
http://www.braziloutsource.com/

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

Reply via email to