hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: NoClassDefFoundError for NTLMScheme
Date Mon, 15 Nov 2004 14:03:08 GMT
On Mon, Nov 15, 2004 at 02:46:19PM +0100, Adriano Labate wrote:
> Oleg,
> 
> My jar is commons-httpclient-3.0-alpha2.jar and it contains the class 
> org.apache.commons.httpclient.auth.NTLMScheme (and not
> org.apache.commons.httpclient.NTLMScheme as written in your message).
> 

My bad.

> If the class was not present I think the error would be instead ClassNotFound 
> and not NoClassDefFound...
> 

Please correct me if I am wrong, but java.lang.ClassNotFound gets

"...Thrown when an application tries to load in a class through its string
name using: 

The forName method in class Class. 
The findSystemClass method in class ClassLoader . 
The loadClass method in class ClassLoader. 
..."

Anyways, something is not quite right with your local setup as the
classloader is unable to load a class shipped with HttpClient, not its
JCE dependencies, as we initially thought. Besides, to my best knowledge
NTLMScheme class has no dependencies on JCE classes of what so ever. It
depends on a private class called NTLM which in its turn dependent on
JCE. If it were a JCE dependency problem the error message should have
been different (unless I am missing something important)

Oleg

> Adriano
> 
> 
> -----Message d'origine-----
> De : Oleg Kalnichevski [mailto:olegk@apache.org] 
> Envoy? : lundi, 15 novembre 2004 14:38
> ? : HttpClient User Discussion
> Cc : Adriano Labate
> Objet : Re: NoClassDefFoundError for NTLMScheme
> 
> Mike,
> 
> That's what I initially thought too. However, the missing class is
> NTLMScheme which is one of HttpClient classes and not that of JCE. My
> guess is that the commons-httpclient jart is somehow corrupt or
> incomplete
> 
> Adriano, could you please verify the integrity of the jar package you
> are using. The package must include
> org.apache.commons.httpclient.NTLMScheme class. If it does not, replace
> it with the latest 3.0 release (3.0-alpha2 as of writing) jar
> 
> Oleg
> 
> 
> On Mon, Nov 15, 2004 at 08:19:53AM -0500, Michael Becke wrote:
> > Hi Adriano,
> > 
> > It sounds like you are using a pre 1.4 JRE.  NTLM requires JCE, which  
> > is included in 1.4+ JREs.  This exception appears to be a bug in  
> > HttpClient 3.0, since it should support all 1.2+ JREs.  JCE should only  
> > be necessary if you want to use NTLM authentication.  I'll mark this as  
> > a bug.
> > 
> > Mike
> > 
> > On Nov 15, 2004, at 6:00 AM, Adriano Labate wrote:
> > 
> > >Hi,
> > >
> > >I got the  following error while sending a file :
> > >
> > >java.lang.NoClassDefFoundError:
> > >org/apache/commons/httpclient/auth/NTLMScheme
> > > at
> > >org.apache.commons.httpclient.auth.AuthPolicy.class$(AuthPolicy.java: 
> > >57)
> > > at
> > >org.apache.commons.httpclient.auth.AuthPolicy.<clinit>(AuthPolicy.java:

> > >9
> > >9)
> > > at
> > >rg.apache.commons.httpclient.auth.AuthChallengeProcessor.selectAuthSche 
> > >m
> > >e(AuthChallengeProcessor.java:86)
> > > at
> > >org.apache.commons.httpclient.auth.AuthChallengeProcessor.processChalle 
> > >n
> > >ge(AuthChallengeProcessor.java:148)
> > > at
> > >org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChalleng 
> > >e
> > >(HttpMethodDirector.java:666)
> > > at
> > >org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationR 
> > >e
> > >sponse(HttpMethodDirector.java:638)
> > > at
> > >org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMeth 
> > >o
> > >dDirector.java:200)
> > > at
> > >org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
> > >4
> > >37)
> > > at
> > >org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 
> > >3
> > >24)
> > > ...
> > >
> > >The client application runs on Windows XP, Oracle 9.2.
> > >The server runs Windows XP, Tomcat 5.0.28
> > >
> > >The problem occurs one or two times at the beginning of a functional
> > >testing day and then we couldn't reproduce it again.
> > >I read that the NTLMScheme is about a proprietary Microsoft
> > >authentication scheme.
> > >
> > >Has anybody experienced the same problem ?
> > >
> > >Is there a way to avoid using the scheme ? I.e using
> > >postMethod.setDoAuthentication(false) ??
> > >
> > >Is the NoClassDefFoundError related to the lack of a dependent library
> > >or component ?
> > >
> > >Best regards,
> > >Adriano Labate
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail:  
> > >httpclient-user-help@jakarta.apache.org
> > >
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> > 

---------------------------------------------------------------------
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