Package org.jitterbit.integration.server.exception

Examples of org.jitterbit.integration.server.exception.ServerConfigurationException


    private ServerGuid lookupGuidFromDatabase() throws ServerConfigurationException {
        try {
            KeyValuesTab keyValues = new KeyValuesTab(tranDbConnection);
            String guid = keyValues.getValueForKey("ServerGUID");
            if (guid == null) {
                throw new ServerConfigurationException("The ServerGUID has not been set in the backend database.");
            }
            return new ServerGuid(guid);
        } catch (SQLException ex) {
            throw new ServerConfigurationException(ex);
        }
    }
View Full Code Here


     *             file.
     */
    public static String getServerHome() throws ServerConfigurationException {
        String jitterbitHome = getServerHomeImpl();
        if (jitterbitHome == null || jitterbitHome.length() == 0) {
            throw new ServerConfigurationException("The environment variable " + JITTERBIT_HOME + " has not been set.");
        }
        File dir = new File(jitterbitHome);
        if (!dir.exists()) {
            throw new ServerConfigurationException("The jitterbit home directory does not exist. " + JITTERBIT_HOME
                            + "=\"" + jitterbitHome + "\".");
        }
        if (!dir.isDirectory()) {
            throw new ServerConfigurationException(JITTERBIT_HOME + " is not set to a directory. " + JITTERBIT_HOME
                            + "=\"" + jitterbitHome + "\".");
        }
        return dir.getAbsolutePath();
    }
View Full Code Here

    private synchronized void loadOptionsImplSynchronized() throws ServerConfigurationException {
        settingsHolder = null;
        try {
            loadOptionsImpl();
        } catch (IOException e) {
            throw new ServerConfigurationException("Failed to load the server options from file. " + e.getMessage(), e);
        }
    }
View Full Code Here

        baseName += Integer.toString(now.get(Calendar.YEAR)) + File.separator;
        baseName += Integer.toString(1+now.get(Calendar.MONTH)) + File.separator;
        baseName += Integer.toString(now.get(Calendar.DAY_OF_MONTH));
        File baseDir = new File(baseName);
        if (baseDir.isFile()) {
            throw new ServerConfigurationException("This file should not exist: " + baseDir.getAbsolutePath());
        }
        if (!baseDir.isDirectory() && !baseDir.mkdirs()) {
            throw new ServerConfigurationException("Failed to create directory \"" + baseDir.getAbsolutePath()
                            + "\". Check permissions on all parent directories!");
        }
        baseName += File.separator + UUID.randomUUID().toString();
        return baseName;
    }
View Full Code Here

    private static Document parseFile(File file) throws ServerConfigurationException {
        try {
            return DomParser.parseFile(file);
        } catch (Exception e) {
            throw new ServerConfigurationException("The file " + file.getAbsolutePath()
                            + " does not contain a valid JDBC driver configuration.", e);
        }
    }
View Full Code Here

        JdbcDriversConfig conf = loadFromFile();
        if (conf == null) {
            conf = loadFromClassPath();
        }
        if (conf == null) {
            throw new ServerConfigurationException("Could not locate the " + CONFIG_FILE +
                    " file. Looked for it in the server home directory (defined by the JITTERBIT_HOME environment " +
                    "variable) and also on the classpath.");
        }
        return conf;
    }
View Full Code Here

    private static JdbcDriversConfig loadFromClassPath() throws ServerConfigurationException {
        try {
            Document dom = DomParser.parseResource(CONFIG_FILE);
            return new JdbcDriversConfig(dom);
        } catch (Exception e) {
            throw new ServerConfigurationException("Failed to parse the jdbc.conf file: " + e.getMessage(), e);
        }
    }
View Full Code Here

     *             registered on the server
     */
    public JdbcDriverDescriptor getDriverDescriptor(String name) throws ServerConfigurationException {
        JdbcDriverDescriptor driver = drivers.get(name);
        if (driver == null) {
            throw new ServerConfigurationException("The JDBC driver \"" + name +
                            "\" has not been registered on this server.");
        }
        return driver;
    }
View Full Code Here

                }
                builder.quotes(BeginEndQuote.fromStrings(beginQuote, endQuote));
                JdbcDriverDescriptor driver = builder.build();
                drivers.put(driver.getName(), driver);
            } catch (Exception ex) {
                error = new ServerConfigurationException("The Drivers section in jdbc.conf contains invalid data.", ex);
            }
        }
View Full Code Here

        commandListener.registerCommandHandler("TestConnection", new TestConnectionHandler());

        try {
            commandListener.startListening();
        } catch (IOException e) {
            throw new ServerConfigurationException("Failed to start command listener. " + e.getMessage(), e);
        }

        // TODO: just for testing
        messageRouter = new MessageRouter(new JmsOperationQueuer(true));
        try {
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.server.exception.ServerConfigurationException

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.