You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Adriano Labate <ad...@sportaccess.com> on 2004/11/15 12:00:54 UTC

NoClassDefFoundError for NTLMScheme

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.selectAuthSchem
e(AuthChallengeProcessor.java:86)
 at
org.apache.commons.httpclient.auth.AuthChallengeProcessor.processChallen
ge(AuthChallengeProcessor.java:148)
 at
org.apache.commons.httpclient.HttpMethodDirector.processWWWAuthChallenge
(HttpMethodDirector.java:666)
 at
org.apache.commons.httpclient.HttpMethodDirector.processAuthenticationRe
sponse(HttpMethodDirector.java:638)
 at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
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


Re: NoClassDefFoundError for NTLMScheme

Posted by Michael Becke <be...@u.washington.edu>.
Hi Oleg,

Yes, I noticed that as well.  I'm not sure exactly how the classloader 
works in this case, but my guess is that because NTLMScheme references 
NTLM it eventually finds a path to JCE.

Adriano, please let us know if you're using a stock 3.0.  If you are 
then we can assume this is the cause of the problem.

Mike

Oleg Kalnichevski wrote:
> 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
> 

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


Re: NoClassDefFoundError for NTLMScheme

Posted by Oleg Kalnichevski <ol...@apache.org>.
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


Re: NoClassDefFoundError for NTLMScheme

Posted by Michael Becke <be...@u.washington.edu>.
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