Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.ConfigurationException


  protected Map<String, UDDINode> getUDDINodes() {
    return uddiNodes;
  }
 
  public UDDINode getHomeNode() throws ConfigurationException {
    if (uddiNodes==null) throw new ConfigurationException("The juddi client configuration " +
        "must contain at least one node element.");
    if (uddiNodes.values().size()==1) return uddiNodes.values().iterator().next();
    for (UDDINode uddiNode : uddiNodes.values()) {
      if (uddiNode.isHomeJUDDI()) {
        return uddiNode;
      }
    }
    throw new ConfigurationException("One of the node elements in the client configuration needs to a 'isHomeJUDDI=\"true\"' attribute.");
  }
View Full Code Here


    throw new ConfigurationException("One of the node elements in the client configuration needs to a 'isHomeJUDDI=\"true\"' attribute.");
  }
 
  public UDDINode getUDDINode(String nodeName) throws ConfigurationException {
    if (! uddiNodes.containsKey(nodeName)) {
      throw new ConfigurationException("Node '" + nodeName
          + "' cannot be found in the config '"+  getManagerName() + "'" );
    }
    return uddiNodes.get(nodeName);
  }
View Full Code Here

    if (managerName!=null) {
      if (managers.containsKey(managerName)) {
        return (managers.get(managerName));
      } else {
        throw new ConfigurationException("No manager by name " + managerName + " was found. " +
            " Please check your client uddi.xml files, and make sure this manager was started");
      }
    } else if (managers.size()==1 && managerName==null) {
      log.debug("Deprecated, please specify a manager name");
      return managers.values().iterator().next();
View Full Code Here

    } else if (managers.size()==1 && managerName==null) {
      String name = managers.keySet().iterator().next();
      log.info("Removing " + name + " from UDDIClient.");
      managers.remove(name);
    } else {
      throw new ConfigurationException("Could not remove UDDIClerkManager for name " + managerName);
    }
  }
View Full Code Here

        managerName = "default";
      }
      if (manager.getName()!=null) {
        logger.info("Starting Clerk Manager " + manager.getName() + "...");
      } else {
        throw new ConfigurationException("A manager name needs to be specified in the client config file.");
      }
      manager.start();
      servletContext.setAttribute(UDDIClerkServlet.UDDI_CLIENT_MANAGER_NAME, manager.getName());
      servletContext.setAttribute(JUDDI_CLIENT_MANAGER_INSTANCE, manager);
    }
View Full Code Here

    getServiceDetail.getServiceKey().add(serviceKey);
    getServiceDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
    try {
      ServiceDetail sd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getServiceDetail(getServiceDetail);
      List<BusinessService> businessServiceList = sd.getBusinessService();
      if (businessServiceList.size() == 0) throw new ConfigurationException("Could not find Service with key=" + serviceKey);
      return businessServiceList.get(0);
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, serviceKey);
    } catch (SOAPFaultException sfe) {
View Full Code Here

    getBindingDetail.getBindingKey().add(bindingKey);
    getBindingDetail.setAuthInfo(getAuthToken(node.getSecurityUrl()));
    try {
      BindingDetail bd = getUDDINode().getTransport().getUDDIInquiryService(node.getInquiryUrl()).getBindingDetail(getBindingDetail);
      List<BindingTemplate> bindingTemplateList = bd.getBindingTemplate();
      if (bindingTemplateList.size() == 0) throw new ConfigurationException("Could not find ServiceBinding with key=" + bindingKey);
      return bindingTemplateList.get(0);
    } catch (DispositionReportFaultMessage dr) {
      DispositionReport report = DispositionReportFaultMessage.getDispositionReport(dr);
      checkForErrorInDispositionReport(report, DispositionReport.E_INVALID_KEY_PASSED, bindingKey);
    } catch (SOAPFaultException sfe) {
View Full Code Here

            _repConfig.putAll((Map)repConfigAttr);
        }

        if (_coalescingSync && _durability.getLocalSync() == SyncPolicy.SYNC)
        {
            throw new ConfigurationException("Coalescing sync cannot be used with master sync policy " + SyncPolicy.SYNC
                    + "! Please set highAvailability.coalescingSync to false in store configuration.");
        }

        super.configure(virtualHost);
    }
View Full Code Here

        {
            return attrValue.toString();
        }
        else
        {
            throw new ConfigurationException("BDB HA configuration key not found. Please specify configuration attribute: "
                                                            + attributeName);
        }
    }
View Full Code Here

    private String getValidatedPropertyFromConfig(String key, Configuration config) throws ConfigurationException
    {
        if (!config.containsKey(key))
        {
            throw new ConfigurationException("BDB HA configuration key not found. Please specify configuration key with XPath: "
                                                + key.replace('.', '/'));
        }
        return config.getString(key);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.configuration.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.