Package com.sun.enterprise.config

Examples of com.sun.enterprise.config.ConfigException


    public void updatePasswordAlias(String aliasName, String password) throws ConfigException       
    {
        try {
            PasswordAdapter p = getPasswordAdapter();
            if (!p.aliasExists(aliasName)) {
                throw new ConfigException(_strMgr.getString("passwordAliasDoesNotExist", aliasName));
            }
            p.setPasswordForAlias(aliasName, password.getBytes());
        } catch (Exception ex) {
            throw getExceptionHandler().handleConfigException(
                ex, "updatePasswordAliasException", aliasName);
View Full Code Here


        //2. Apply appName filter
        if (null != appName) {
            if (s.contains(appName)) {
                return new String[] {appName};
            } else {
                throw new ConfigException(localStrings.getString(
                    "admin.mbeans.acmb.appRefDoesnotExistForTheTarget",
                    appName, target.getName()));
            }
        }
        return (String[])s.toArray(new String[0]);
View Full Code Here

                    break;
                }
            }
            if (!isReffed)
            {
                throw new ConfigException(localStrings.getString(
                    "applicationRefDoesnotExist", targetName, key));
            }
        }
        return on;
    }
View Full Code Here

  ConfigContext ctx = getConfigContext();
  ConfigBean app = ApplicationHelper.findApplication(ctx, name);
  if ( (app!=null) && !(app instanceof LifecycleModule) ) {

    throw new ConfigException(localStrings.getString(
        "admin.mbeans.acmb.duplicateLCMName", name));
  }

        Boolean isRegistered = isLifecycleModuleRegistered(name);
        final DeploymentTarget target = getAndValidateDeploymentTarget(
View Full Code Here

                virtualServerIds.add(aServer.getId());
            }
        }

        if (!virtualServerIds.isEmpty()) {
            throw new ConfigException(localStrings.getString(
                                    "admin.mbeans.acmb.def_web_module_refs_exist",
                                                            virtualServerIds.toString(), webModuleName));
        }
    }
View Full Code Here

                //referencing its config
                String configName = ServerHelper.getConfigForServer(getConfigContext(),
                    target.getName()).getName();
                if (!ConfigAPIHelper.isConfigurationReferencedByServerOnly(getConfigContext(),
                    configName, target.getName())) {
                        throw new ConfigException(localStrings.getString(
                            "configurationHasMultipleRefs", target.getName(), configName,
                            ConfigAPIHelper.getConfigurationReferenceesAsString(
                                getConfigContext(), configName)));  
                }                                             
            } else if (target.getType() == TargetType.CLUSTER) {
                //If we are operating on a cluster, ensure that the cluster is the only entity
                //referencing its config
                String configName = ClusterHelper.getConfigForCluster(getConfigContext(),
                    target.getName()).getName();
                if (!ConfigAPIHelper.isConfigurationReferencedByClusterOnly(getConfigContext(),
                    configName, target.getName())) {
                        throw new ConfigException(localStrings.getString(
                            "configurationHasMultipleRefs", target.getName(), configName,
                            ConfigAPIHelper.getConfigurationReferenceesAsString(
                                getConfigContext(), configName)));
                }    
            }
View Full Code Here

        try
        {
            ElementProperty ep = domain.getElementPropertyByName(DOMAIN_NAME_XML_PROPERTY);
           
            if(ep == null)
                throw new ConfigException("The property, " + DOMAIN_NAME_XML_PROPERTY + ", was null");
           
            String domainName = ep.getValue();
           
            if(domainName == null || domainName.length() < 1)
                throw new ConfigException("The value of the property, " + DOMAIN_NAME_XML_PROPERTY + ", was null or empty");
           
            System.setProperty(DOMAIN_NAME_SYSTEM_PROPERTY, domainName);
        }
        catch(ConfigException ce)
        {
            throw ce;
        }
        catch(Exception e)
        {
            throw new ConfigException("Error getting " + DOMAIN_NAME_XML_PROPERTY + " from domain.xml", e);
        }
    }
View Full Code Here

     * @param args arguments to be passed to the log message
     * @return ConfgException
     */   
    public ConfigException handleConfigException(Exception ex, String messageId, String[] args)
    {
        ConfigException result = null;
        Level level = Level.FINE;
        if (ex instanceof ConfigException) {                      
            result = (ConfigException)ex;
        } else
            level = Level.WARNING;
            result = new ConfigException(ex);
        }
        StringManagerBase sm = StringManagerBase.getStringManager(getLogger().getResourceBundleName());           
        getLogger().log(level, sm.getString(messageId, args), ex);            
        return result;
    }   
View Full Code Here

                }
            }

            if(!bFoundProcess) {
                // error flaguser
                throw new ConfigException(_strMgr.getString("launcher.process_launcher_config_not_found",
                    new String[]{process, configFile}));
            }
        } catch (ConfigException ce) {
            throw ce;
        } catch (Exception e) {
            throw new ConfigException(_strMgr.getString("launcher.process_launcher_config_exception", _configFile), e);
        }
    }
View Full Code Here

    private void checkArg(Object o, Object msg) throws ConfigException
    {
        if (null == o)
        {
            throw new ConfigException(msg.toString());
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.ConfigException

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.