throw new Exception("Unable to load keystore "+ keyStoreName,e);
throw new Exception("Unable to load keystore "+ keyStoreName + ": " + e);
	private void initConfiguredKey() throws KeyStoreException, Exception,			IOException, NoSuchAlgorithmException, CertificateException,			UnrecoverableKeyException	{		InputStream inputStream = null;		// must not use default keystore type - as does not support secret keys		KeyStore store = KeyStore.getInstance("JCEKS");				SecretKey tempKey = null;		try		{			// load in keystore using this thread's classloader			inputStream = Thread.currentThread().getContextClassLoader()					.getResourceAsStream(keyStoreName);			// we can't find a keystore here - 			if (inputStream == null)			{				throw new Exception("Unable to load keystore " + keyStoreName +						" ensure file is on classpath");			}			// we have located a file lets load the keystore			try{			store.load(inputStream, storePassword.toCharArray());			// loaded keystore - get the key			tempKey = (SecretKey) store					.getKey(alias, keyPassword.toCharArray());			} catch (IOException e){				throw new Exception("Unable to load keystore "+ keyStoreName,e);			}catch (NoSuchAlgorithmException e){				throw new Exception("No Such algorithm "+ keyStoreName,e);			}catch(CertificateException e){				throw new Exception("Certificate exception "+ keyStoreName,e);			}						if (tempKey == null)			{				throw new Exception("Unable to retrieve key '" + alias						+ "' from keystore " + keyStoreName);			}			//set the key here			setSecretKey(tempKey);			symAlgorithm = tempKey.getAlgorithm();						// set the fact we are using a supplied key						suppliedKey = true;			queue_down =false;			queue_up =false;		} finally		{			// close the input stream			try			{				inputStream.close();			} catch (Exception e)			{			}		}	}