commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching <>
Subject Re: Really stuck on NoClassDefFoundError org/apache/commons/logging/LogFactory
Date Thu, 22 Jun 2006 11:14:01 GMT
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>(
> 	at junit.framework.TestSuite.runTest(
> 	at
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
> 	at
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
> 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
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

Sorry I can't be more specific than that, but it's a complicated
scenario you've got.



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message