hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: Logging related problems with HttpClient
Date Fri, 23 Jun 2006 11:18:58 GMT
Hello Neelesh,

> I have made sure that following jars are in the classpath :
> commons-codec-1.3.jar
> commons-logging-1.1.jar
> commons-logging-adapters-1.1.jar
> commons-logging-api-1.1.jar
> junit-4.1.jar
> commons-httpclient-3.0.1.jar

You don't need junit to run HttpClient, only to build it.

> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/commons/logging/LogFactory
>       at 
org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
>       at src.com.example.web.Sample.main(Sample.java:12)
> 
> Any pointers regarding how to remove this error and get the code 
working?

Being in the classpath is not enough. Find out in which
classloader the JARs are. Make sure there are no duplicates
in other classloaders along the parent chain. If HttpClient
is in a parent classloader of commons-logging, it doesn't
have access to the classes.

Also try with commons-logging 1.0.3 instead of 1.1. I don't
know whether they are binary compatible.

If nothing helps, consider asking on the commons-logging
mailing list. They should have more experience with
classloader issues.

hope that helps,
  Roland



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message