Package org.mule.api.config

Examples of org.mule.api.config.ConfigurationException


                String className = (String) props.get(extension);

                if (className == null || !ClassUtils.isClassOnPath(className, this.getClass()))
                {
                    throw new ConfigurationException(
                        CoreMessages.configurationBuilderNoMatching(createConfigResourcesString()));
                }

                ConfigResource[] constructorArg = new ConfigResource[configs.size()];
                System.arraycopy(configs.toArray(), 0, constructorArg, 0, configs.size());
                ConfigurationBuilder cb = (ConfigurationBuilder) ClassUtils.instanciateClass(className, new Object[] {constructorArg});
                if (domainContext != null && cb instanceof DomainMuleContextAwareConfigurationBuilder)
                {
                    ((DomainMuleContextAwareConfigurationBuilder) cb).setDomainContext(domainContext);
                }
                else if (domainContext != null)
                {
                    throw new MuleRuntimeException(CoreMessages.createStaticMessage(String.format("ConfigurationBuilder %s does not support domain context", cb.getClass().getCanonicalName())));
                }
                cb.configure(muleContext);
            }
        }
        catch (ConfigurationException e)
        {
            throw e;
        }
        catch (Exception e)
        {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here


            applyLifecycle(muleContext.getLifecycleManager());
            configured = true;
        }
        catch (Exception e)
        {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

    @Override
    public void configure(MuleContext muleContext) throws ConfigurationException
    {
        if (configResources == null)
        {
            throw new ConfigurationException(CoreMessages.objectIsNull("Configuration Resources"));
        }

        super.configure(muleContext);

        logger.info(CoreMessages.configurationBuilderSuccess(this, createConfigResourcesString()));
View Full Code Here

            }
            return configResources;
        }
        catch (IOException e)
        {
            throw new ConfigurationException(e);
        }
    }
View Full Code Here

    @Override
    public MuleEvent prepareRouting(MuleEvent sourceEvent, MuleEvent event) throws ConfigurationException
    {
        if (!event.isSynchronous())
        {
            throw new ConfigurationException(CoreMessages.watermarkRequiresSynchronousProcessing());
        }

        String variableName = this.watermark.resolveVariable(event);
        event.setFlowVariable(variableName, sourceEvent.getFlowVariable(variableName));
        return event;
View Full Code Here

            event.getMessage().setPayload(
                new SelectorIteratorProxy<Object>((Iterator<Object>) payload, selector));
        }
        else
        {
            throw new ConfigurationException(
                CoreMessages.createStaticMessage(String.format(
                    "Poll executing with payload of class %s but selector can only handle Iterator and Iterable objects when watermark is to be updated via selectors",
                    payload.getClass().getCanonicalName())));
        }
View Full Code Here

                catch (Exception e)
                {
                    basepath = (basepath.equals("") ? "/" : basepath);
                }
                //lets just log a noticeable exception as a warning since the Guice build can compliment other configuration builders
                logger.warn(new ConfigurationException(CoreMessages.createStaticMessage("There are no Guice modules or module factories on the classpath under: " + basepath)));
                return;
            }

            for (Class<Module> moduleClass : classes)
            {
View Full Code Here

    {
        Preconditions.checkState(StringUtils.isNotEmpty(serviceAddress), "No serviceAddress provided in WS consumer config");

        if (connectorConfig != null && connector != null)
        {
            throw new ConfigurationException(CoreMessages.createStaticMessage("Cannot set both connector-config and connector-ref attributes. Set either one of them, or none for default behavior."));
        }

        if (useHttpModule())
        {
            return createHttpRequester();
View Full Code Here

            this.compiledExpression = Ognl.parseExpression(expression);
            this.expression = expression;
        }
        catch (OgnlException ex)
        {
            throw new ConfigurationException(ex);
        }
    }
View Full Code Here

            registry = new SpringRegistry((ConfigurableApplicationContext) applicationContext,
                                          parentContext, muleContext);
        }
        else
        {
            throw new ConfigurationException(
                    MessageFactory.createStaticMessage("Cannot set a parent context if the ApplicationContext does not implement ConfigurableApplicationContext"));
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.config.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.