Package org.mule.api.lifecycle

Examples of org.mule.api.lifecycle.InitialisationException


    {
        super.initialise();

        if(getBeanFactory()==null && getBeanClass()==null)
        {
            throw new InitialisationException(CoreMessages.objectIsNull("beanFactory"), this);
        }
        else if(getBeanClass()!=null)
        {
            setBeanFactory(new PrototypeObjectFactory(getBeanClass()));
        }
View Full Code Here


        {
            bpms.deployProcess(resource);
        }
        catch (Exception e)
        {
            throw new InitialisationException(e, this);
        }
    }
View Full Code Here

    @Override
    protected void doInitialise() throws InitialisationException
    {
        if (serviceUrl == null)
        {
            throw new InitialisationException(CoreMessages.objectIsNull("serviceUrl"), this);
        }
        else if (!muleContext.getExpressionManager().isExpression(serviceUrl))
        {
            try
            {
                new URL(serviceUrl);
            }
            catch (MalformedURLException e)
            {
                throw new InitialisationException(e, this);
            }
        }

        if (errorFilter == null)
        {
View Full Code Here

        {
            tls.initialise(null == getKeyStore(), TlsConfiguration.JSSE_NAMESPACE);
        }
        catch (CreateException e)
        {
            throw new InitialisationException(e, this);
        }
        super.doInitialise();
    }
View Full Code Here

            quartzScheduler.getContext().put(MuleProperties.MULE_CONTEXT_PROPERTY, muleContext);           
       
        }
        catch (Exception e)
        {
            throw new InitialisationException(CoreMessages.initialisationFailure("Quartz conntector"), e, this);
        }
    }
View Full Code Here

        {
            messageProcessor = builder.build();
        }
        catch (Exception e)
        {
            throw new InitialisationException(e, this);
        }

        if (messageProcessor instanceof Initialisable)
        {
            ((Initialisable) messageProcessor).initialise();
View Full Code Here

            {
                jndiContext = new InitialContext(props);
            }
            catch (NamingException e)
            {
                throw new InitialisationException(e, this);
            }
        }
    }
View Full Code Here

            initJndiContext();
        }
        catch (Exception e)
        {
            throw new InitialisationException(
                CoreMessages.failedToCreate("AbstractJndiConnector"), e, this);
        }

        return jndiContext;
    }
View Full Code Here

        if (scriptEngineName != null)
        {
            scriptEngine = createScriptEngineByName(scriptEngineName);
            if (scriptEngine == null)
            {
                throw new InitialisationException(MessageFactory.createStaticMessage("Scripting engine '" + scriptEngineName + "' not found.  Available engines are: " + listAvailableEngines()), this);
            }
        }
        // Determine scripting engine to use by file extension
        else if (scriptFile != null)
        {
            int i = scriptFile.lastIndexOf(".");
            if (i > -1)
            {
                logger.info("Script Engine name not set. Guessing by file extension.");
                String ext = scriptFile.substring(i + 1);
                scriptEngine = createScriptEngineByExtension(ext);
                if (scriptEngine == null)
                {
                    throw new InitialisationException(MessageFactory.createStaticMessage("File extension '" + ext + "' does not map to a scripting engine.  Available engines are: " + listAvailableEngines()), this);
                }
                else
                {
                    setScriptEngineName(scriptEngine.getFactory().getEngineName());
                }
            }
        }

        Reader script;
        // Load script from variable
        if (StringUtils.isNotBlank(scriptText))
        {
            script = new StringReader(scriptText);
        }
        // Load script from file
        else if (scriptFile != null)
        {
            InputStream is;
            try
            {
                is = IOUtils.getResourceAsStream(scriptFile, getClass());
            }
            catch (IOException e)
            {
                throw new InitialisationException(CoreMessages.cannotLoadFromClasspath(scriptFile), e, this);
            }
            if (is == null)
            {
                throw new InitialisationException(CoreMessages.cannotLoadFromClasspath(scriptFile), this);
            }
            script = new InputStreamReader(is);
        }
        else
        {
            throw new InitialisationException(CoreMessages.propertiesNotSet("scriptText, scriptFile"), this);
        }

        // Pre-compile script if scripting engine supports compilation.
        if (scriptEngine instanceof Compilable)
        {
            try
            {
                compiledScript = ((Compilable) scriptEngine).compile(script);
            }
            catch (ScriptException e)
            {
                throw new InitialisationException(e, this);
            }
        }
    }
View Full Code Here

        {
            configureComponentBindings();
        }
        catch (MuleException e)
        {
            throw new InitialisationException(e, this);
        }
    }
View Full Code Here

TOP

Related Classes of org.mule.api.lifecycle.InitialisationException

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.