commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neelesh Bodas" <neelesh.bo...@gmail.com>
Subject Logging related problem with HttpClient
Date Thu, 22 Jun 2006 17:41:29 GMT
Hello,

I am having problems while using HttpClient. Here is a sample code :

package src.com.example.web;
// all necessary imports
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.params.HttpMethodParams;


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();

	  }
}

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

I am getting the following runtime error:

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)

I have also tried using log4j but that didnot solve the problem. (As
an aside I am using Java 5.0 so I thing the logging facility provided
by java.util should be fine)

Any pointers regarding how to remove this error and get the code working?

Thanks in Advance
~Neelesh

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


Mime
View raw message