Hi,

Well, I'm using LDAPConnection with SSL, keystore and everything works
fine,
BUT, i'm using JMETER to stress the server with multiple thread binds,
the problem is that I receive some random exception in few cases,

that's my code, I made the method as synchronized but didn't help ...

Code:
--------------------

public synchronized LDAPConnection exampleCon(String username, String pass) throws Exception {

LDAPSocketFactory ssf;

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

System.setProperty("javax.net.ssl.trustStore", "mypath");

ssf = new LDAPJSSESecureSocketFactory();

LDAPConnection conn = new LDAPConnection(ssf);

conn.connect("myhost", 636 );
conn.bind( "version" , username , pass.getBytes("UTF8") );
return conn;

}

--------------------


When I'm running the tests these are the random erros that can ocurr

Code:
--------------------
LDAPException: I/O Exception on host localhost, port 636 (91) Connect Error
java.io.IOException: Output stream not initialized
--------------------



Code:
--------------------
LDAPException: I/O Exception on host localhost, port 636 (91) Connect Error
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLException: java.lang.ArrayIndexOutOfBoundsException
--------------------



Code:
--------------------
LDAPException: I/O Exception on host localhost, port 636 (91) Connect Error
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderE xception: unable to find valid certification path to requested target
--------------------



Any ideas why i get this random exceptions???


--
japaphr
------------------------------------------------------------------------
japaphr's Profile: http://forums.novell.com/member.php?userid=85213
View this thread: http://forums.novell.com/showthread.php?t=410116