Package org.olat.core.logging

Examples of org.olat.core.logging.StartupException


       
        if (portlet instanceof OLATExtension) {
          try {
            extMgr.deployExtension((OLATExtension)portlet);
          } catch (IOException ioe) {
            throw new StartupException("Error deploying bean '" + portlet + "'.", ioe);
          }
        }
      }
    }
    catch (ClassCastException cce) {
        throw new StartupException("Configured portlet is not of type portlet", cce);
    }
   
  }
View Full Code Here


        if (portal instanceof OLATExtension) {
          try {
            extMgr.deployExtension((OLATExtension)portal);
          } catch (IOException ioe) {
            throw new StartupException("Error deploying bean '" + portal + "'.", ioe);
          }
        }
      }
    }
    catch (ClassCastException cce) {
        throw new StartupException("Configured portlet is not of type portal", cce);
    }
  }
View Full Code Here

        FolderConfig.setFolderRoot(homesRoot + "_junittest");
      } else {
        FolderConfig.setFolderRoot(homesRoot);
      }
    } catch (Exception e) {
      throw new StartupException("Unable to find folder root config. Please fix!", e);
    }
    Tracing.logInfo("Folder root set to '" + FolderConfig.getCanonicalRoot() + "'.", FolderModule.class);

    // Set maximum upload filesize
    try {
View Full Code Here

  public void destroy() {
    try {
      // closing database session for this thread
      DBImpl.getInstance(false).closeSession()
    } catch (Exception e) {
      throw new StartupException("Error closing database. ", e.getCause());
    }
  }
View Full Code Here

      }
     
      // test database settings, if something is wrong we will get exception here
      DBFactory.getInstance()
    } catch (Exception e) {
      throw new StartupException("Database mapping problem. Check your build.properties for valid entries. Empty values can cause problems!", e);
    }
    DBImpl.getInstance(false).intermediateCommit();
  }
View Full Code Here

  /**
   * [spring]
   * @param instanceId
   */
  public void setInstanceId(String instanceId) {
    if (instanceId == null) throw new StartupException("No instance id set for this installation (see build.properties). Please fix!");
    if (instanceId.length() > 10) throw new StartupException("InstanceID is limited to 10 characters (see build.properties). Please fix!", null);
    WebappHelper.instanceId = instanceId;
  }
View Full Code Here

   * @param userDataRoot
   */
  public void setUserDataRoot(String userDataRoot) {
    File fUserData = new File(userDataRoot);
    if (!fUserData.exists()) {
      if (!fUserData.mkdirs()) throw new StartupException("Unable to create userdata dir '" + userDataRoot + "'. Please fix!");
    }
    WebappHelper.userDataRoot = userDataRoot;
  }
View Full Code Here

          if (regexp.startsWith("##")) continue;
          else {
            try {
              Pattern.compile(regexp);
            } catch (PatternSyntaxException pse) {
              throw new StartupException("Invalid pattern syntax in blacklist. Pattern: " + regexp);
            }
            loginBlacklist.add(regexp);
            count++;
          }
        }
        Tracing.logInfo("Successfully added " + count + " entries to login blacklist.", UserModule.class);
      } catch (Exception e) {
        throw new StartupException("Unable to read blacklist. Please fix.");
      } finally {
        if (fReader != null) try {
          fReader.close();
        } catch (Exception e) {
          // ok in finally block.
        }
      }
    }

    // Autogeneration of test users
    String generateTestUsers = configuration.getChildValue("generateTestUsers");
    if (generateTestUsers == null) hasTestUsers = false;
    else {
      if (generateTestUsers.equals("true")) {
        hasTestUsers = true;
      } else if (generateTestUsers.equals("false")) {
        hasTestUsers = false;
      } else {
        throw new StartupException("UserModule configuration Element 'generateTestUsers' was set to '" + generateTestUsers
            + "' but only value 'true' or 'false' is allowed.");
      }
    }
    // Check if default users exists, if not create them
    securityManager = ManagerFactory.getManager();
View Full Code Here

        propertyDefined = true;
        break;
      }
    }
    if ( ! propertyDefined) {
      throw new StartupException("The user property handler for the mandatory user property "
        + userPropertyIdentifyer + " is not defined. Check your olat_userconfig.xml file!");
    }
  }
View Full Code Here

        Indexer reporsitoryEntryIndexer = (Indexer) iter.next();
        RepositoryEntryIndexerFactory.getInstance().registerIndexer(reporsitoryEntryIndexer);
        if (Tracing.isDebugEnabled(RepositoryIndexer.class)) Tracing.logDebug("Adding indexer from configuraton:: ", RepositoryIndexer.class);
      }
    }  catch (ClassCastException cce) {
        throw new StartupException("Configured indexer is not of type RepositoryEntryIndexer", cce);
    }
  }
View Full Code Here

TOP

Related Classes of org.olat.core.logging.StartupException

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.