Commons-logging 1.1 indeed solved the problem via eclipse --> debug --> classpath --> add external jars, I put in commons-logging 1.1 and it worked. Glad I had a 1.1 option ;-) .
Thanks! Robert On 6/22/06, Simon Kitching <[EMAIL PROTECTED]> wrote:
Hi Robert, On Wed, 2006-06-21 at 19:40 -0300, robert lazarski wrote: > 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, that 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) [snip] > 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) > > I'm running 1.04, but tried to upgrade to 1.1 with no luck. I tried > butting 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. This kind of problem is what the recent logging-1.1 release was aimed at dealing with. JBoss does some odd things with commons-logging. Junit and eclipse also do some odd stuff with classpaths. As a result, things can indeed get quite confusing. I suspect that the 1.1 release will solve the problem if you can just find the right place to deploy it. If you set system property org.apache.commons.logging.diagnostics.dest=STDOUT then logging 1.1 will generate output to stdout. If you don't get any output, then you have probably not found the right place to deploy the jarfile. Sorry I can't be more specific than that, but it's a complicated scenario you've got. Regards, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]