Package org.jboss.soa.esb

Examples of org.jboss.soa.esb.ConfigurationException


        throw new GatewayException("This Gateway only accepts FTP and SFTP.");
      }
    }
    catch (RemoteFileSystemException ex)
    {
      throw new ConfigurationException(ex);
    }
   
  }
View Full Code Here


        }
        if(targetURLString != null) {
            try {
                return new URI(targetURLString);
            } catch (URISyntaxException e) {
                throw new ConfigurationException("'url' property is not a valid URI.");
            }
        }

        return null;
    }
View Full Code Here

     * @param propertyValue The value of the property.
     * @param propertyName  The name of the property.
     */
    protected void assertPropertySetAndNotBlank(String propertyValue, String propertyName) throws ConfigurationException {
        if(propertyValue == null || propertyValue.trim().equals("")) {
            throw new ConfigurationException(getClass().getSimpleName() + " must be configured with a non-blank value for the '" + propertyName + "' property.");
        }
    }
View Full Code Here

     
    this.config = config;
    try {
      this.constructor = actionClass.getConstructor();
    } catch (SecurityException e) {
      throw new ConfigurationException(e);
    } catch (NoSuchMethodException e) {
      throw new ConfigurationException(e);
    }
    this.methodInfo = ActionProcessorMethodInfo.getMethodInfo(config, actionClass);
  }
View Full Code Here

    protected void assertPropertyIsInteger(String propertyValue, String propertyName) throws ConfigurationException {
        assertPropertySetAndNotBlank(propertyValue, propertyName);
        try {
            Integer.parseInt(propertyValue);
        } catch(NumberFormatException e) {
            throw new ConfigurationException(getClass().getSimpleName() + " must be configured with an Integer value for the '" + propertyName + "' property.");
        }
    }
View Full Code Here

            {
                return new PasswordUtil(password).getPasswordAsString();
            }
            catch (final IOException e)
            {
                throw new ConfigurationException(e.getMessage(), e);
            }
        }
        return password;
    }
View Full Code Here

                    URI fileURI = new URI(keyStore);                   
                    if(fileURI.isAbsolute()) {
                        return new KeyMaterial(fileURI.toURL().openStream(), keyStorePassword.toCharArray());
                    }
                } catch (URISyntaxException e) {
                    throw new ConfigurationException("Failed to load keystore '" + keyStore + "'.");
                }
            }
        } catch (IOException e) {
            throw new ConfigurationException("Failed to load keystore '" + keyStore + "'.", e);
        } catch (GeneralSecurityException e) {
            throw new ConfigurationException("Failed to load keystore '" + keyStore + "'.", e);
        }

        throw new ConfigurationException("Failed to locate keystore '" + keyStore + "'.");
    }
View Full Code Here

                try {
                    ProtocolSocketFactoryBuilder factoryBuilder = (ProtocolSocketFactoryBuilder) factoryClass.newInstance();
                    factoryBuilder.setConfiguration(properties);
                    socketFactory = factoryBuilder.newInstance();
                } catch (InstantiationException e) {
                    throw new ConfigurationException("Failed to instantiate ProtocolSocketFactoryBuilder implementation class [" + factory + "]. Must provide a default constructor.", e);
                } catch (IllegalAccessException e) {
                    throw new ConfigurationException("Failed to instantiate ProtocolSocketFactoryBuilder implementation class [" + factory + "]. Must provide a default constructor.", e);
                }
            } else {
                socketFactory = (ProtocolSocketFactory) factoryClass.newInstance();
            }
        } catch (ClassCastException e) {
            throw new ConfigurationException("Class [" + factory + "] must implement [" + ProtocolSocketFactory.class.getName() + "].", e);
        } catch (ClassNotFoundException e) {
            throw new ConfigurationException("ProtocolSocketFactory implementation class [" + factory + "] not found in classpath.", e);
        } catch (InstantiationException e) {
            throw new ConfigurationException("Failed to instantiate ProtocolSocketFactory implementation class [" + factory + "].", e);
        } catch (IllegalAccessException e) {
            throw new ConfigurationException("Failed to instantiate ProtocolSocketFactory implementation class [" + factory + "].", e);
        }

        if(socketFactory instanceof SSLClient && keyMaterial != null) {
            try {
                ((SSLClient)socketFactory).setKeyMaterial(keyMaterial);
            } catch (NoSuchAlgorithmException e) {
                throw new ConfigurationException("Failed to configure SSL Keystore on SSLClient.", e);
            } catch (KeyStoreException e) {
                throw new ConfigurationException("Failed to configure SSL Keystore on SSLClient.", e);
            } catch (KeyManagementException e) {
                throw new ConfigurationException("Failed to configure SSL Keystore on SSLClient.", e);
            } catch (IOException e) {
                throw new ConfigurationException("Failed to configure SSL Keystore on SSLClient.", e);
            } catch (CertificateException e) {
                throw new ConfigurationException("Failed to configure SSL Keystore on SSLClient.", e);
            }
        }

        return socketFactory;
    }
View Full Code Here

        URL trustStoreURL = getTruststoreURL();

        try {
            return new AuthSSLProtocolSocketFactory(keyStoreURL, keyStorePW, trustStoreURL, trustStorePW);
        } catch (GeneralSecurityException e) {
            throw new ConfigurationException("Failed to create AuthSSLProtocolSocketFactory instance.", e);
        } catch (IOException e) {
            throw new ConfigurationException("Failed to create AuthSSLProtocolSocketFactory instance.", e);
        }
    }
View Full Code Here

                            {Object.class});
        }
        catch (InvocationTargetException ex) {
            _logger.debug(ex);

            throw new ConfigurationException(ex);
        }
        catch (IllegalAccessException ex) {
            _logger.debug(ex);

            throw new ConfigurationException(ex);
        }
        catch (InstantiationException ex) {
            _logger.debug(ex);

            throw new ConfigurationException(ex);
        }
        catch (ClassNotFoundException ex) {
            _logger.debug(ex);

            throw new ConfigurationException(ex);
        }
        catch (NoSuchMethodException ex) {
            _logger.debug(ex);

            throw new ConfigurationException(ex);
        }
    } // ________________________________
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.ConfigurationException

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.