You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Simon Kitching <sk...@apache.org> on 2006/06/24 08:06:15 UTC

Re: [logging] Logging related problem with HttpClient

Hi Neelesh/Ortwin,

While the library being used is HttpClient, the problem does seem to
really be a commons-logging(JCL)issue, and therefore belongs on this
list. I've changed the subject of this email to indicate this.

The httpclient 3.0.1 dependencies do specify commons-logging 1.0.3, but
the latest version (1.1) should be 100% backwards compatible while
having a lot less bugs, so logging 1.1 should be the right version to
use in this case.

In general, the commons-logging-api jar is intended only for use by
Apache Tomcat (and maybe other container frameworks). You might want to
use the full jar, or possibly the -adapters one if you're running this
code in a container that already deploys JCL.

>>From the exception stacktrace it looks like you're writing some sort of
webapp, running in some sort of container:
org/apache/commons/logging/LogFactory
org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:65)
src.com.example.web.Sample.main(Sample.java:12)

This page might be helpful:
  http://jakarta.apache.org/commons/logging/troubleshooting.html
If this doesn't solve your problem, then please post further details of
the environment you're actually running this code in.

Regards,

Simon

On Thu, 2006-06-22 at 19:47 +0200, Ortwin Glück wrote:
> Neelesh,
> 
> Please see http://jakarta.apache.org/commons/httpclient/dependencies.html
> for the correct version of the dependencies.
> 
> Note: HttpClient is no longer in Jakarta Commons. Our mailing lists are
> these:
> http://jakarta.apache.org/commons/httpclient/mail-lists.html
> 
> Cheers
> 
> Ortwin
> 
> Neelesh Bodas wrote:
> > 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)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 


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