commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From A Leg <hale_in...@yahoo.com>
Subject Re: [httpclient] about bad_record_mac; Solved
Date Fri, 25 Mar 2005 13:54:44 GMT
Hi

I finaly find out the problem :
I was a ClassLoader problem :
For my application I make a jar containing all classes required. 
Including httpclient classes etc.
On the devt machine my custom SecureProtocolSocketFactory was loaded and 
so it was working.

On the production machine it was a common-httpclient.jar in the 
J2RE_LIBRARY/ext

And the classLoader was not loading the SecureProtocolSocketFactory from 
my jar but from this common-httpclient.jar in the J2RE_LIBRARY/ext
I have deleted common-httpclient.jar in the J2RE_LIBRARY/ext and now it 
works.

I really have difficulties to understand how classLoader works. I am 
comming from C language, with .a static it was simple, with dynamic .so 
it is still possible to understand. But here I really don't understand.

When I am launching the appli I do :
java -jar myjar.jar

So I don't understand why this stupid loader go get anything in 
J2RE_LIBRARY/ext and use it with higher priority than elements in my jar.
I still don't beleive it. I got the same problem using java 1.5 on the 
same machine. And j2sdk1.4.2_04 is exactly the same between both machines.
I dont have any common-httpclient.jar in the J2RE_LIBRARY/ext in the 
devt machine.

If any body understand better than me. Please tell me it would be usefull.

One more time thank's for httpclient team. This project is realy well 
written.
To figure out what was going on I have been inside the code and it is a 
really nice job.

Thank's specially to Brad, Steve and Oleg.

Have nice time.

Andre






A Leg wrote:

> Hi
>
> I post a few weeks ago a bad_record_mac error.
> With Steve, Brad and Oleg help I solved it.
>
> My appli was working good until now. I have added
>      ((SSLSocket)socket).setEnabledProtocols(new String[] {"SSLv3"});
>      ((SSLSocket)socket).setUseClientMode(true);
>
> In my custom SecureProtocolSocketFactory
>
> I just install my appli on the production machine : just transfert the 
> jar and run appli.
> And patatra similar (not same) problem (see log below). I then 
> recompile on production machine : same result.
>
> My production machine run mandrake 10.1 with 2.6.8.1 kernel and 
> j2sdk1.4.2_04
> Devt machine run fedora2 with 2.6.7 kernel and j2sdk1.4.2_04.
> The  problem does not arrived at same level it is at the very begining 
> on the good working machine the blocking point is passed with success 
> even it the connection to internet is closed.
>
> Any idea welcome
>
> Andre
>
> Mar 25, 2005 7:46:23 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: I/O exception caught when processing request: Received fatal 
> alert: bad_record_mac
> Mar 25, 2005 7:46:23 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: Retrying request
> Mar 25, 2005 7:46:24 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: I/O exception caught when processing request: Received fatal 
> alert: bad_record_mac
> Mar 25, 2005 7:46:24 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: Retrying request
> Mar 25, 2005 7:46:25 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: I/O exception caught when processing request: Received fatal 
> alert: bad_record_mac
> Mar 25, 2005 7:46:25 AM 
> org.apache.commons.httpclient.HttpMethodDirector executeWithRetry
> INFO: Retrying request
> Exception in thread "main" javax.net.ssl.SSLException: Received fatal 
> alert: bad_record_mac
>        at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.b(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
>        at com.sun.net.ssl.internal.ssl.AppOutputStream.write(DashoA6275)
>        at 
> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
>        at 
> java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
>        at 
> org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:825)

>
>        at 
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1920) 
>
>        at 
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1002) 
>
>        at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:382)

>
>        at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168)

>
>        at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393) 
>
>        at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) 
>
>        at org.compiere.mfg_scm.mageManager.Mages.main(Unknown Source)
>


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