Code example for KeyStoreException

Methods: getMessage

0
			// Read the keystore file 
			fis = new FileInputStream(new File(serverkeyfile));
		} catch (FileNotFoundException e) {
			throw new TransportException("Unable to open keyStore at: " + serverkeyfile);
		} catch (KeyStoreException e) {
			throw new TransportException(e.getMessage());
		} 
 
		// Load the keystore in memory 
		try { 
			serverKeyStore.load(fis, password.toCharArray());
			logger.debug("There are " + serverKeyStore.size() + " entries in the keystore");
		} catch (NoSuchAlgorithmException e) {
			throw new TransportException("Problems occurred while loading the SSL certificate from the keyStore. " + e.getMessage());
		} catch (CertificateException e) {
			throw new TransportException("Problems occurred while loading the SSL certificate from the keyStore. " + e.getMessage());
		} catch (IOException e) {
			throw new TransportException("Invalid keyStore password. " + e.getMessage());
		} catch (KeyStoreException e) {
			throw new TransportException(e.getMessage());
		}