Package org.talend.esb.auxiliary.storage.common.exception

Examples of org.talend.esb.auxiliary.storage.common.exception.InitializationException


        try {
            schema = (new Schema.Parser()).parse(PersistencyFileManager.class.getResourceAsStream(schemaResourceName));
        } catch (Exception e) {
            String errorMessage = "Failed to initialize auxiliary storage persistency manager: " + e.getMessage();
            LOG.log(Level.SEVERE, errorMessage);
            throw new InitializationException(errorMessage);
        }


        File storageDir = new File(storageDirPath);
        if (!storageDir.exists()) {
            try {
                FileUtils.forceMkdir(storageDir);
            } catch (IOException e) {
                String errorMessage = "Failed to initialize auxiliary storage persistency manager. " +
                                      "Failed to create directory " + storageDirPath + " for file-based persistence storage. " +
                                      "Error message is: " + e.getMessage();
                LOG.log(Level.SEVERE, errorMessage);
                throw new InitializationException(errorMessage);
            }
        }
    }
View Full Code Here


    public void init() throws InitializationException {

        if (repositoryFactory == null) {
            String errorMessage = "Failed to initialize auxiliary storage persistency manager. JCR repository factory is null.";
            LOG.log(Level.SEVERE, errorMessage);
            throw new InitializationException(errorMessage);
        }


        HashMap<String,String> parameters = new HashMap<String, String>();
        parameters.put(RepositoryFactoryImpl.REPOSITORY_HOME, storageDirPath);
        parameters.put(RepositoryFactoryImpl.REPOSITORY_CONF, "etc/org.talend.esb.auxiliary.repo.xml");


        try {
            repository = repositoryFactory.getRepository(parameters);
        } catch (RepositoryException e) {
            String errorMessage = "Failed to initialize auxiliary storage persistency manager. " +
                                  "Failed to inititalize jackrabbit repository: " + e.getMessage();
            LOG.log(Level.SEVERE, errorMessage);
            throw new InitializationException(errorMessage);
        }
    }
View Full Code Here

            session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
            return session;
        } catch (LoginException e) {
            String errorMessage = "Failed to login to jackrabbit repository: " + e.getMessage();
            LOG.log(Level.SEVERE, errorMessage);
            throw new InitializationException(errorMessage);
        } catch (RepositoryException e) {
            String errorMessage = "Error occured during login process to jackrabbit repository: " + e.getMessage();
            LOG.log(Level.SEVERE, errorMessage);
            throw new InitializationException(errorMessage);
        }
    }
View Full Code Here

TOP

Related Classes of org.talend.esb.auxiliary.storage.common.exception.InitializationException

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.