hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neelesh Bodas" <neelesh.bo...@gmail.com>
Subject Re: Logging related problems with HttpClient
Date Fri, 23 Jun 2006 04:56:49 GMT
Thanks for the reply. My comments are inlined.

> You're *sure* they're in the classpath?  Can you prove it (to yourself)
> somehow?  It would seem that unless you're doing strange things with
> classloaders, you wouldn't get this error if you have
> commons-logging-1.1.jar in your classpath.
> Erik

I don't know what it exactly means to "prove" that they are in
classpath, but this is what I did :

package src.com.example.web;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.params.HttpMethodParams;
import org.apache.commons.logging.*;

public class Sample {
	private static String url = "http://www.apache.org/";

	  public static void main(String[] args) {
	    // Create an instance of HttpClient.
	    //HttpClient client = new HttpClient();   // Commented out temporarily.

	    LogFactory.getLog(Sample.class); // works

	    LogFactory.getLog(HttpClient.class); // doesnot work at run time


I observe that the LogFactory class has no problem in getting loaded,
which means that Commons-logging might not be an issue. Also from the
error messages it appears that HttpClient class is available, but it
is *HttpClient* class which is not able to find LogFactory. So this
leaves me wondering why HttpClient class has a problem finding the
LogFactory if my Sample class doesnot?


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

View raw message