Package org.apache.airavata.credential.store.store

Examples of org.apache.airavata.credential.store.store.CredentialStoreException


        } catch (SQLException e) {
            StringBuilder stringBuilder = new StringBuilder("Error retrieving all credentials");

            log.debug(stringBuilder.toString(), e);

            throw new CredentialStoreException(stringBuilder.toString(), e);
        } finally {
            DBUtil.cleanup(preparedStatement, resultSet);
        }

        return credentialList;
View Full Code Here


                objectInputStream = new ObjectInputStream(new ByteArrayInputStream(data));
                o = objectInputStream.readObject();

            } catch (IOException e) {
                throw new CredentialStoreException("Error de-serializing object.", e);
            } catch (ClassNotFoundException e) {
                throw new CredentialStoreException("Error de-serializing object.", e);
            } catch (GeneralSecurityException e) {
                throw new CredentialStoreException("Error decrypting data.", e);
            }
        } finally {
            if (objectInputStream != null) {
                try {
                    objectInputStream.close();
View Full Code Here

        try {
            objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
            objectOutputStream.writeObject(o);
            objectOutputStream.flush();
        } catch (IOException e) {
            throw new CredentialStoreException("Error serializing object.", e);
        } finally {
            if (objectOutputStream != null) {
                try {
                    objectOutputStream.close();
                } catch (IOException e) {
                    log.error("Error occurred while closing object output stream", e);
                }
            }
        }

        // encrypt the byte array
        if (encrypt()) {
            byte[] array = byteArrayOutputStream.toByteArray();
            try {
                return SecurityUtil.encrypt(this.keyStorePath, this.secretKeyAlias, this.keyStorePasswordCallback, array);
            } catch (GeneralSecurityException e) {
                throw new CredentialStoreException("Error encrypting data", e);
            } catch (IOException e) {
                throw new CredentialStoreException("Error encrypting data. IO exception.", e);
            }
        } else {
            return byteArrayOutputStream.toByteArray();
        }
    }
View Full Code Here

    public ConfigurationReader() throws CredentialStoreException {

        try {
            loadConfigurations();
        } catch (Exception e) {
            throw new CredentialStoreException("Unable to read credential store specific configurations." , e);
        }


    }
View Full Code Here

            email.addTo(emailMessage.getSenderEmail());
            email.send();

        } catch (EmailException e) {
            log.error("[CredentialStore]Error sending email notification message.");
            throw new CredentialStoreException("Error sending email notification message", e);
        }


    }
View Full Code Here

            sshCredential.setPublicKey(pubKey);
            sshCredential.setPassphrase(password);
            return sshCredential;
    } catch (IOException e) {
      logger.error("IO Exception when creating SSH credential ",e);
      throw new CredentialStoreException("Unable to generate SSH Credential", e);
    } catch (JSchException e) {
      logger.error("JSch SSH credential creation exception ",e);
      throw new CredentialStoreException("Unable to generate SSH Credential. JSch exception ", e);
    }
  }
View Full Code Here

                    connection.rollback();
                } catch (SQLException e1) {
                    logger.error("Unable to rollback transaction", e1);
                }
            }
            throw new CredentialStoreException("Unable to retrieve database connection.", e);
        } finally {
            DBUtil.cleanup(connection);
        }

    }
View Full Code Here

    private Connection getConnection() throws CredentialStoreException {
        try {
            return this.dbUtil.getConnection();
        } catch (SQLException e) {
            throw new CredentialStoreException("Unable to retrieve database connection.", e);
        }
    }
View Full Code Here

                    connection.rollback();
                } catch (SQLException e1) {
                    log.error("Unable to rollback transaction", e1);
                }
            }
            throw new CredentialStoreException("Unable to retrieve database connection.", e);
        } finally {
            DBUtil.cleanup(connection);
        }

    }
View Full Code Here

            stringBuilder.append("community user email - ").append(user.getUserEmail());
            stringBuilder.append("token id - ").append(token);

            log.error(stringBuilder.toString(), e);

            throw new CredentialStoreException(stringBuilder.toString(), e);
        } finally {

            DBUtil.cleanup(preparedStatement);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.credential.store.store.CredentialStoreException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.