Jump to content

P4java Exception:

p4java p4javassl sslhandshakeException

  • Please log in to reply
1 reply to this topic

#1 bht



  • Members
  • Pip
  • 1 posts

Posted 20 October 2013 - 06:53 AM


we've been using perforce from quite long using a p4v client,  started a java program to access perforce API.

I'm getting Invalid SSL session error :-

com.perforce.p4java.exception.ConnectionException: Error occurred during the SSL handshake: invalid SSL session

when debugged the SSL connection i saw: "javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure".

I'm unable to proceed further, Any help Appriciated.

Code Snippet:

     String serverUri = " p4javassl:// **** : **** ";

      IOptionsServer server = ServerFactory.getOptionsServer(serverUri,null); // this is executed fine,                                                                                                                           // server is accessible.

        server.addTrust(new TrustOptions().setAutoAccept(true)); //getting exception on this line.

           IServerInfo sinfo = server.getServerInfo();

catch (ConnectionException e) {

#2 P4Matt


    Advanced Member

  • Members
  • PipPipPip
  • 1383 posts

Posted 22 October 2013 - 05:37 AM

Did you download the unlimited strength (apparently that's a thing?) JCE package for your version of Java? The standard JDK ships with 128-bit SSL encryption support, but Perforce uses 256-bit SSL encryption. The details suchas they are can be found in the P4Java release notes:


Also tagged with one or more of these keywords: p4java, p4javassl, sslhandshakeException

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users