Package org.apache.turbine.services

Examples of org.apache.turbine.services.InitializationException


        {
            userClass = Class.forName(userClassName);
        }
        catch(Exception e)
        {
            throw new InitializationException(
                "Failed create a Class object for User implementation", e);
        }

        try
        {
            userManager =  (UserManager)Class.
                forName(userManagerClassName).newInstance();
            setInit(true);
        }
        catch(Exception e)
        {
            throw new InitializationException("BaseSecurityService.init: Failed to instantiate UserManager" ,e);
        }

    }
View Full Code Here


                "because scheduler.enabled is not 'true' in the TurbineResources.properties file.");
            }
        }
        catch (Exception e)
        {
            throw new InitializationException("TurbineSchedulerService failed to initialize", e);
        }
    }
View Full Code Here

            registerConfiguration("vm");
            setInit(true);
        }
        catch (Exception e)
        {
            throw new InitializationException(
                "Failed to initialize TurbineVelocityService", e);
        }
    }
View Full Code Here

            /*
             * This will be caught and rethrown by the init() method.
             * Oh well, that will protect us from RuntimeException folk showing
             * up somewhere above this try/catch
             */
            throw new InitializationException(
                "Failed to set up TurbineVelocityService", e);
        }
    }
View Full Code Here

        
            setInit(true);
        }
        catch (Exception e)
        {
            throw new InitializationException(
                "TurbineIntakeService failed to initialize", e);
        }
    }
View Full Code Here

        }
        catch (Exception e)
        {
            if (userClass == null)
            {
                throw new InitializationException(
                        "Failed to create a Class object for User implementation", e);
            }
            if (groupClass == null)
            {
                throw new InitializationException(
                        "Failed to create a Class object for Group implementation", e);
            }
            if (permissionClass == null)
            {
                throw new InitializationException(
                        "Failed to create a Class object for Permission implementation", e);
            }
            if (roleClass == null)
            {
                throw new InitializationException(
                        "Failed to create a Class object for Role implementation", e);
            }
            if (aclClass == null)
            {
                throw new InitializationException(
                        "Failed to create a Class object for ACL implementation", e);
            }
        }

        try
        {
            UserManager userManager =
                    (UserManager) Class.forName(userManagerClassName).newInstance();

            userManager.init(conf);

            setUserManager(userManager);
        }
        catch (Exception e)
        {
            throw new InitializationException("Failed to instantiate UserManager", e);
        }

        try
        {
            aclFactoryService = (FactoryService) TurbineServices.getInstance().
                    getService(FactoryService.SERVICE_NAME);
        }
        catch (Exception e)
        {
            throw new InitializationException(
                    "BaseSecurityService.init: Failed to get the Factory Service object", e);
        }

        setInit(true);
    }
View Full Code Here

            {
                mimeTypeMap = new MimeTypeMap(path);
            }
            catch (IOException x)
            {
                throw new InitializationException(path, x);
            }
        }
        else
        {
            mimeTypeMap = new MimeTypeMap();
        }

        if (conf != null)
        {
            path = conf.getString(CHARSETS);
            if (path != null)
            {
                path = TurbineServlet.getRealPath(path);
            }
        }
        if (path != null)
        {
            try
            {
                charSetMap = new CharSetMap(path);
            }
            catch (IOException x)
            {
                throw new InitializationException(path, x);
            }
        }
        else
        {
            charSetMap = new CharSetMap();
View Full Code Here

                    throw new IllegalArgumentException(CACHE_CHECK_FREQUENCY + " must be >0");
                }
            }
            catch (Exception x)
            {
                throw new InitializationException(
                        "Failed to initialize TurbineGlobalCacheService", x);
            }
        }

        try
        {
            cache = new Hashtable(cacheInitialSize);

            // Start housekeeping thread.
            Thread housekeeping = new Thread(this);
            // Indicate that this is a system thread. JVM will quit only when there
            // are no more active user threads. Settings threads spawned internally
            // by Turbine as daemons allows commandline applications using Turbine
            // to terminate in an orderly manner.
            housekeeping.setDaemon(true);
            housekeeping.start();

            setInit(true);
        }
        catch (Exception e)
        {
            throw new InitializationException(
                    "TurbineGlobalCacheService failed to initialize", e);
        }
    }
View Full Code Here

                    String newPath =
                            config.getServletContext().getRealPath((String) subVal);

                    if (newPath == null)
                    {
                      throw new InitializationException("Could not translate path " + subVal);
                    }

                    subVal = newPath;
                    log.debug("Now: " + subVal);
                }

                loaderConf.addProperty(subProperty + "." + subKey,
                        subVal);
            }

            log.info("Added " + key + " as a component");
        }

        try
        {
            ComponentLoader cl = new ComponentLoader(loaderConf);
            components = cl.load();
            setInit(true);
        }
        catch (Exception e)
        {
            log.error("Component Service failed: ", e);
            throw new InitializationException("ComponentService failed: ", e);
        }
    }
View Full Code Here

        }
        catch (Exception e)
        {
            if (rolePeerClassName == null || rolePeerClass == null)
            {
                throw new InitializationException(
                    "Could not find RolePeer class ("
                    + rolePeerClassName + ")", e);
            }
            if (tableName == null)
            {
                throw new InitializationException(
                    "Failed to get the table name from the Peer object", e);
            }

            if (roleObject == null || roleObjectName == null)
            {
                throw new InitializationException(
                    "Failed to get the object type from the Peer object", e);
            }


            if (nameColumn == null || namePropDesc == null)
            {
                throw new InitializationException(
                    "RolePeer " + rolePeerClassName
                    + " has no name column information!", e);
            }
            if (idColumn == null || idPropDesc == null)
            {
                throw new InitializationException(
                    "RolePeer " + rolePeerClassName
                    + " has no id column information!", e);
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.turbine.services.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.