hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Ernst ...@ae-online.de>
Subject Re: ClientAuthentication example java.lang.NoClassDefFoundError
Date Tue, 01 Dec 2009 15:22:48 GMT
Andreas Ernst schrieb:
> Hi,
> 
> i tried the example ClientAuthentication, but the example throws an 
> exception:
> 
> run:
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/commons/logging/LogFactory
>         at 
> org.apache.http.impl.client.AbstractHttpClient.<init>(AbstractHttpClient.java:159)

> 
>         at 
> org.apache.http.impl.client.DefaultHttpClient.<init>(DefaultHttpClient.java:178)

> 
>         at 
> org.apache.http.examples.client.ClientAuthentication.main(ClientAuthentication.java:28)

> 
> Caused by: java.lang.ClassNotFoundException: 
> org.apache.commons.logging.LogFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:303)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)
>         ... 3 more
> Java Result: 1
> ERSTELLEN ERFOLGREICH (Gesamtzeit: 0 Minuten 0 Sekunden)
> 
> 
> The class org.apache.commons.logging.LogFactory is not found at this line:
> 
> DefaultHttpClient httpclient = new DefaultHttpClient();
> 
> I looked into the source code, but i did not find any logger definition.
> 
> Any hints?

ok, there are several dependencies, so i use the

httpcomponents-client-4.0-bin-with-dependencies.zip

within my classpath and i worked.

-- 
Andreas Ernst - IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
ae@ae-online.de www.ae-online.de
www.tachyon-online.de

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


Mime
View raw message