If you've ever been confronted with the horror below, you can try to fix it by ensuring the security classes normally contained in the path given by the default System property java.ext.dirs are present. As far as I know, the ones being complained about below are in jre/lib/ext/sunpkcs11.jar. The exception occurred for me through unsetting java.ext.dirs.
14:15:26.081 [main] DEBUG HBOS - Attempting to hit page https://www.halifax-online.co.uk/_mem_bin/formslogin.asp...
14:15:27.464 [main] ERROR HBOS -
javax.net.ssl.SSLKeyException: RSA premaster secret error
at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:116) [na:1.6.0_0]
at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:593) [na:1.6.0_0]
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) [na:1.6.0_0]
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:533) [na:1.6.0_0]
at sun.security.ssl.Handshaker.process_record(Handshaker.java:471) [na:1.6.0_0]
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:904) [na:1.6.0_0]
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1116) [na:1.6.0_0]
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:643) [na:1.6.0_0]
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:78) [na:1.6.0_0]
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) [na:1.6.0_0]
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) [na:1.6.0_0]
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:827) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1975) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) [commons-httpclient-3.0.1.jar:3.0.1]
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:324) [commons-httpclient-3.0.1.jar:3.0.1]
at HBOS.getAndDiscard(HBOS.java:84) [tmp/:na]
at HBOS.main(HBOS.java:42) [tmp/:na]
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:141) [na:1.6.0_0]
at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:191) [na:1.6.0_0]
at sun.security.ssl.JsseJce.getKeyGenerator(JsseJce.java:240) [na:1.6.0_0]
at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:108) [na:1.6.0_0]
... 19 common frames omitted