Examples of ConfigurationError


Examples of anvil.server.ConfigurationError

    SessionContainerPreferences prefs = zone.getSessionContainerPreferences();
    String hostname = prefs.getPreference("host", "localhost").toString();
    try {
      _address = InetAddress.getByName(hostname);
    } catch (UnknownHostException e) {
       throw new ConfigurationError("Unknown host '"+hostname+"'");
    }
    _port = prefs.getIntPreference("port", 9000);
    _cleaner = new SessionCleaner("Cleaner-"+_port, prefs.getCheckoutFrequency());
    _cleaner.setDaemon(true);
    _cleaner.start();
View Full Code Here

Examples of anvil.server.ConfigurationError

          } else if (tag.equals("message")) {
            list.add(new Integer(FMT_MESSAGE));
          } else if (tag.equals("exception")) {
            list.add(new Integer(FMT_EXCEPTION));
          } else {
            throw new ConfigurationError("Invalid log format tag '{"+tag+"}'");
          }
          text.setLength(0);
        }
      } else {
        text.append(ch);
View Full Code Here

Examples of anvil.server.ConfigurationError

        _layout = (LogLayout)Class.forName(s).newInstance();
      } catch (ConfigurationError e) {
        e.fillInStackTrace();
        throw e;
      } catch (Throwable t) {
        throw new ConfigurationError("Couldn't create log layout: "+s+", reason: "+t.toString());
      }
    } else {
      throw new ConfigurationError("Unknown log layout '"+_layout+"'");
    }
   
    _target = prefs.getTarget();
   
    if (_target.equals("stderr")) {   
      _output = System.err;
      _flush = false;
     
    } else if (_target.equals("stdout")) {   
      _output = System.out;
      _flush = false;
     
    } else {
      try {
        _output = new BufferedOutputStream(new FileOutputStream(_target));
      } catch (IOException e) {
        throw new ConfigurationError("Couldn't open log file '"+_target+"'");
      }
    }
  }
View Full Code Here

Examples of anvil.server.ConfigurationError

  {
    _name = prefs.getName();
    _zone = prefs.getParent();
    String dir = (String)prefs.getPreference("dir");
    if (dir == null) {
      throw new ConfigurationError("Required parameter 'dir' missing from realm preferences");
    }
    _dir = new File(dir);
    _index = new File(_dir, "index");
    _copyonget = prefs.getBooleanPreference("copyonget", false);
    _copyonset = prefs.getBooleanPreference("copyonset", false);
View Full Code Here

Examples of anvil.server.ConfigurationError

  public void initialize(Zone zone, NamespacePreferences prefs)
  {
    String filename = (String)prefs.getPreference("file");
    if (filename == null) {
      throw new ConfigurationError("PersistentFileNamespace requires existends of property 'file'");
    }
    File file = new File(filename);
    _name = prefs.getName();
    _file = file;
    _zone = zone;
View Full Code Here

Examples of org.apache.james.managesieve.api.ConfigurationError

    protected File getSieveRootDirectory() {
        try {
            return _fileSystem.getFile(SIEVE_ROOT);
        } catch (FileNotFoundException ex1) {
            throw new ConfigurationError(ex1);
        }
    }
View Full Code Here

Examples of org.infoglue.cms.exception.ConfigurationError

      SimpleStringManager manager = (SimpleStringManager) iterator.next();
      if(manager.containsKey(key)) {
        return manager.getString(key);
      }
    }
    throw new ConfigurationError(sm.getString("chain.getString.not_found_error", key));
  }
View Full Code Here

Examples of org.infoglue.cms.exception.ConfigurationError

    try {
      final Properties properties = new Properties();
      properties.load(getResourceAsStream(name, ResourceHelper.class));
      return properties;
    } catch(Exception e) {
      throw new ConfigurationError(sm.getString("resource.loadProperties.error", name), e);
    }
  }
View Full Code Here

Examples of org.infoglue.cms.exception.ConfigurationError

      while((count = reader.read(buf, 0, CHAR_BUFFER_SIZE)) > 0) {
        sb.append(buf, 0, count);
      }
      return sb.toString();
    } catch(Exception e) {
      throw new ConfigurationError(sm.getString("resource.readResource.error", name), e);
    }
  }
View Full Code Here

Examples of org.infoglue.cms.exception.ConfigurationError

   */
  private void initializePackageNames(String commaSeparatedPackageNames)
  {
    if (commaSeparatedPackageNames == null)
    {
      throw new ConfigurationError("web.xml not properly configured, did not contain the " + PACKAGE_NAMES_INIT_PARAM + " init param for the VelocityServlet.");
    }

    final StringTokenizer st = new StringTokenizer(commaSeparatedPackageNames, ",");
    this.packageNames = new String[st.countTokens()];
    for (int i = 0; st.hasMoreTokens(); ++i)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.